Button
A clear, responsive action with quiet secondary states.
A compact button for frequent toolbar actions.
npx shadcn@latest add @silicon-ui/action-buttonnpx shadcn@latest add @silicon-ui/action-buttonInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/action-button/action-button.tsxcomponents/silicon-ui/action-button/action-button.module.csscomponents/silicon-ui/text-morph/text-morph.tsx sharedcomponents/silicon-ui/text-morph/text-morph.module.css sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
label* | string | — |
onAction* | () => void | Promise<void> | — |
successLabel | string | "Saved" |
pendingLabel | string | "Saving" |
resetAfterMs | number | 2400 |
onActionError | (error: unknown) => void | — |
Also accepts the props of ButtonHTMLAttributes<HTMLButtonElement>, except onClick, onDrag, onDragEnd, onDragStart, onAnimationStart.