Action button
A compact button for frequent toolbar actions.
A clear, responsive action with quiet secondary states.
npx shadcn@latest add @silicon-ui/buttonnpx shadcn@latest add @silicon-ui/buttonInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/button/button.tsxcomponents/silicon-ui/button/button.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
variant | ButtonVariant
| "primary" |
size | ButtonSize
| "md" |
loading | boolean | false |
Also accepts the props of ButtonHTMLAttributes<HTMLButtonElement>, except onDrag, onDragEnd, onDragStart, onAnimationStart.