Button
Buttons allow users to take actions with a single tap. They come in various styles and sizes.
Import
import { Button, ButtonGroup, Row } from '@sigx/daisyui';
Basic Usage
Loading preview...
Variants
Use the variant prop to change the button style.
Loading preview...
Sizes
Use the size prop to change button size.
Loading preview...
States
Buttons support disabled and loading states.
Loading preview...
Styles
Use outline, soft, or dash for alternative styles.
Loading preview...
Shapes
Use square or circle for icon-only buttons.
Loading preview...
Wide and Block
Use wide for a wider button or block for full width.
Loading preview...
Active
Force the active state with the active prop.
Loading preview...
Button Group
Group related buttons together.
Loading preview...
Props
Button Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'ghost' | 'link' | undefined | Button color variant |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Button size |
outline | boolean | false | Use outline style |
soft | boolean | false | Use soft style |
dash | boolean | false | Use dashed-border style |
wide | boolean | false | Wider button |
block | boolean | false | Full-width button |
square | boolean | false | Square shape (icon button) |
circle | boolean | false | Circle shape (icon button) |
active | boolean | false | Force active state |
disabled | boolean | false | Disable the button |
loading | boolean | false | Show loading spinner |
type | 'button' | 'submit' | 'reset' | 'button' | HTML button type |
class | string | undefined | Additional CSS classes |
ButtonGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
class | string | undefined | Additional CSS classes |