Button

Button

Button component is used to handle user interactions.

Examples
API

Button props extends the button HTML attributes.

PropdescriptionTypeDefault
variant

The variant of the button

'primary' | 'default'

'default'

colors

The color variables of the button, i.e. var(--primary)

{
primary?: string

error?: string

text?: string

border?: string

inputBackground?: string

primaryFocus?: string

}

undefined

danger

Signals that it should be used with caution. It is often used in a delete button or to show the error status.

boolean

false

size

The size of the button

'sm' | 'md' | 'lg'

'md'

icon

Icon of the button passed in as a form of ReactNode

React.ReactNode

undefined

ellipsis

Whether the button text should be truncated with an ellipsis. The button should have a width to be able to truncate the text.

boolean

false