Button#

Buttons allow users to take actions with a single tap. They come in various styles and sizes.

Import#

TSX
import { Button, ButtonGroup, Row } from '@sigx/daisyui';

Basic Usage#

TSX
Loading preview...

Variants#

Use the variant prop to change the button style.

TSX
Loading preview...

Sizes#

Use the size prop to change button size.

TSX
Loading preview...

States#

Buttons support disabled and loading states.

TSX
Loading preview...

Styles#

Use outline, soft, or dash for alternative styles.

TSX
Loading preview...

Shapes#

Use square or circle for icon-only buttons.

TSX
Loading preview...

Wide and Block#

Use wide for a wider button or block for full width.

TSX
Loading preview...

Active#

Force the active state with the active prop.

TSX
Loading preview...

Button Group#

Group related buttons together.

TSX
Loading preview...

Props#

Button Props#

PropTypeDefaultDescription
variant'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'ghost' | 'link'undefinedButton color variant
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Button size
outlinebooleanfalseUse outline style
softbooleanfalseUse soft style
dashbooleanfalseUse dashed-border style
widebooleanfalseWider button
blockbooleanfalseFull-width button
squarebooleanfalseSquare shape (icon button)
circlebooleanfalseCircle shape (icon button)
activebooleanfalseForce active state
disabledbooleanfalseDisable the button
loadingbooleanfalseShow loading spinner
type'button' | 'submit' | 'reset''button'HTML button type
classstringundefinedAdditional CSS classes

ButtonGroup Props#

PropTypeDefaultDescription
classstringundefinedAdditional CSS classes