Button
Displays a button or a component that looks like a button.
Usage
Variants
Sizes
States & Icons (Slots)
API Reference
| Input | Type | Default |
|---|---|---|
| variant | ButtonVariants['variant'] | 'solid' |
| size | ButtonVariants['size'] | 'md' |
| type | 'button' | 'submit' | 'reset' | 'button' |
| disabled | boolean | false |
| class | string | '' |
| customClass | string | '' |
CVA variants
| Prop | Options | Default |
|---|---|---|
| variant | solid | destructive | outline | ghost | link | solid |
| size | sm | md | lg | icon | md |
Component Source
Install via CLI:
npx @voltui/cli add buttonTypeScript
Loading editor…
Copy this code to your project. The component uses ng-primitives and class-variance-authority.