Stagger Button

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

Loading...

Installation

npx shadcn@latest add @scrollxui/stagger-button 

Usage

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

Examples


Up

Loading...

Alternate Even

Loading...

Alternate Odd

Loading...

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.