Stagger Button

Interactive button with animated stagger text and customizable styles for modern uis.

Installation

npx shadcn@latest add https://scrollxui.dev/registry/stagger-button.json 

Usage

import { StaggerButton } from "@/components/ui/stagger-button";
<StaggerButton direction="up">
     Get started
  </StaggerButton> 

Examples


Up


Alternate Even


Alternate Odd

API Reference

Stagger Button

Interactive button with animated stagger text and customizable styles for modern uis.

Props

PropertyTypeDefaultDescription
variantstringdefault
Button style (default, destructive, outline,..)
sizestringdefault
Button size (default, sm, lg, icon)
asChildboolean
Renders as Slot child element
textstring
Base button text
hoverTextstring
Text displayed on hover
staggerDelaynumber0.05
Delay between each character animation
staggerDurationnumber1
Duration of the stagger animation
directionstringdown
Animation direction (up, down, alternate-even, alternate-odd)
easingnumber[][0.22, 1, 0.36, 1]
Easing curve for animation timing
disableStaggerboolean
Disables stagger text animation
classNamestring
Custom CSS classes for styling
childrenReactNode
Button content: text or elements
...propsbutton props
Supports native button attributes and events

Built withby Ahdeetai.