Installation
npx shadcn@latest add @iconiq/origin-buttonProps
OriginButton
9 props
Ref-forwarding motion button with a pointer-origin fill, press feedback, and native form support. Hover, focus-visible, pointer-down, and keyboard activation spread the fill from the entry point.
children
React.ReactNodeButton label or custom content rendered above the animated fill layer.
type
"button" | "submit" | "reset"Default
buttonNative button type. Defaults to button so the control does not submit a form unless you opt in.
loading
booleanDefault
falseSets aria-busy and disables interaction while a form or async action is in progress.
disabled
booleanDefault
falseNative disabled state. Also suppresses fill, press, and ripple-like feedback.
className
stringOptional class names merged onto the root button element.
onClick
React.MouseEventHandler<HTMLButtonElement>Native click handler forwarded to the underlying button.
name
stringForm field name submitted with the parent form.
value
stringOptional submitted value when type is submit.
form
stringAssociates the button with a form element by id.
Notes
Standard button attributes such as aria-*, autoFocus, formAction, formEncType, formMethod, formNoValidate, formTarget, and data-* are forwarded to the underlying motion.button.
Pointer-down sets the fill origin at the click point and enters a pressed state; pointer-up, pointer-leave, pointer-cancel, and blur clear it.
Space and Enter mirror the pressed and fill state for keyboard users. Space calls preventDefault so the page does not scroll while the button is focused.
Uses card/muted surfaces in dark mode, a foreground fill in light mode, and a neutral-50 fill in dark mode so resting and filled states stay legible.
Icon-only usage should include aria-label or aria-labelledby for an accessible name.