Action Swap

CTA button and slot primitives for swapping text and icons with blur motion.

Cascade

action-swap-cascade.tsx

Letter-by-letter slot roll — the old label's letters drop away as the new ones land, left to right.

Install

$ bunx --bun shadcn add @beui/action-swap-cascade

API Reference

ActionSwapCascadeButton

defaultValue?
string
—
className?
string
—
size?
"sm" | "md" | "lg" | "icon"
—
value?
string
—
onValueChange?
((value: string, item: ActionSwapItem) => void)
—
variant?
"outline" | "primary" | "secondary" | "ghost"
—
items
ActionSwapItem[]
—
iconOnly?
boolean
—
cycle?
boolean
—

ActionSwapCascadeText

className?
string
—
value
string
—

ActionSwapCascadeIcon

className?
string
—
value
string
—

Blur

action-swap-blur.tsx

Copy-button style swap with blur, opacity and scale.

Install

$ bunx --bun shadcn add @beui/action-swap-blur

API Reference

ActionSwapBlurButton

defaultValue?
string
—
className?
string
—
size?
"sm" | "md" | "lg" | "icon"
—
value?
string
—
onValueChange?
((value: string, item: ActionSwapItem) => void)
—
variant?
"outline" | "primary" | "secondary" | "ghost"
—
items
ActionSwapItem[]
—
iconOnly?
boolean
—
cycle?
boolean
—

ActionSwapBlurText

className?
string
—
value
string
—

ActionSwapBlurIcon

className?
string
—
value
string
—

Roll

action-swap-roll.tsx

The next text or icon rolls in from below with blur.

Install

$ bunx --bun shadcn add @beui/action-swap-roll

API Reference

ActionSwapRollButton

defaultValue?
string
—
className?
string
—
size?
"sm" | "md" | "lg" | "icon"
—
value?
string
—
onValueChange?
((value: string, item: ActionSwapItem) => void)
—
variant?
"outline" | "primary" | "secondary" | "ghost"
—
items
ActionSwapItem[]
—
iconOnly?
boolean
—
cycle?
boolean
—

ActionSwapRollText

className?
string
—
value
string
—

ActionSwapRollIcon

className?
string
—
value
string
—

Updated