Skip to main content

Examples

Default

Active

Sizes

Long Label

Toggling

Props

AiButton

A pill button for AI actions. The label shimmers letter by letter and the glyph flickers at rest; on hover both settle and the green treatment eases in together — outline, rim and a sheen pooling along the bottom edge under the cursor, which follows it across the button. On focus each letter blooms once before the shimmer resumes. The lit rim and sheen come from the fv-ai-button utility in base.css. It shares Button’s geometry — rounded-full, the same heights and label typography — so it sits alongside one without looking foreign. Both labels are rendered stacked in a single grid cell, so swapping to active crossfades without the button changing width. Honours prefers-reduced-motion: the shimmer and flicker are dropped and the label renders in its settled state. Set idleShimmer={false} when several AiButtons sit side by side, so an idle one sits still and the shimmer reads as “this one is genuinely busy” rather than “any of these could be clicked”.
string
required
Resting label. Also the accessible name unless aria-label is given.
boolean
default:"false"
Swap to activeLabel and keep the shimmer running.
string
Label shown while active. Falls back to label.
ReactNode
Replace the leading AI glyph.
boolean
default:"true"
Shimmer and flicker while enabled and idle, inviting a click. Turn off when several AiButtons sit side by side, so an idle one sits still and only the active one reads as busy.
"24" | "32" | "40"
default:"32"
"button" | "submit" | "reset"
default:"button"

Exported types

Also exported from @fanvue/ui: AiButtonProps, AiButtonSize.
Setup: Installation · Theming