Win the press,thenthe break- that's the half in two beats.
Installation
npx shadcn@latest add @iconiq/buttonProps
Button
6 props
Ref-forwarding button built on motion.button plus a CVA recipe for size and variant styling.
variant
"default" | "destructive" | "outline" | "secondary" | "ghost" | "link"Default
defaultChooses the visual recipe from the exported buttonVariants map.
size
"sm" | "md" | "lg" | "custom"Default
mdControls height and padding. The custom size leaves sizing classes empty so the caller can drive layout entirely through className.
type
"button" | "submit" | "reset"Default
buttonPassed directly to the underlying motion.button so the component does not submit forms accidentally by default.
children
ReactNodeContent rendered above the ripple layer inside a z-10 span.
className
stringMerged after the generated CVA classes, making it the main escape hatch for one-off layout changes.
disabled
booleanNative disabled state. It also prevents ripple creation because the pointer-down handler exits early.
Notes
Standard button attributes such as onClick, aria-*, name, form, and data-* are forwarded to the underlying motion.button.
The local pointer-down handler always calls your onPointerDown first, then decides whether to spawn a ripple.
Reduced-motion users still get the button component, but the ripple effect is skipped.