An accent button that keeps its color in Light and Dark. Hover sweeps a sheen.
FreeWeb and MobileMotion
Preview
npx shadcn add @fetaui/gradient-buttonPlayground
Colors
Icon
Disabled
Color
Icons animation
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/gradient-button
Colors
Emerald, Violet and Orange keep their color in Light and Dark.
Motion
Accessibility
- A native button. White text stays on the gradient in both themes.
Motion
- Hover sweeps a sheen once, a soft light follows the cursor and a ring of the button's own colors turns around the edge every 2.4 s.
- The button drifts up to 3 px toward the pointer and settles in 420 ms when it leaves. The icon tilts and pops on a spring.
- A press deepens the gradient, sinks the button to 0.97 and sends a ripple and six sparks out from the press point in 600 ms.
- With reduced motion, or
animatedoff, only the color changes stay: no light, ring, pull, sheen or burst.
Responsive behavior
- Height steps up on Mobile through the size tokens.
Performance
- The sheen is a one shot CSS transition on a pseudo element. No JavaScript runs on hover.
- The press is a transform on a spring, so it never runs layout.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import from @/components/fetaui/gradient-button.
- color is emerald, violet or orange. Children are the label and icon goes before it.
- An icon with no text needs aria-label.
- There is no loading state. Use Button or Particle Button for async work.
Related
ButtonComponentOne family for every action, with a label, optional icons and a shortcut key.Particle ButtonComponentAn async button that walks Idle, Pending, Success and Error.Slide Text ButtonComponentThe label slides up one row on hover or focus while a second label rises in.Expanding Arrow ButtonComponentA wide call to action where a chip opens across the button as its chevrons run.