Button

Displays a button or a component that looks like a button.

Basic

asChild

Variants

The appearance can be toggled by specifying the variants attribute.

Primary

Secondary

Destructive

Outline

Ghost

Size

The size can be toggled by specifying the size attribute.

Small

Large

Icon

Disabled

Basic

State

Interval

Click and hold to repeat the clicking action.

Basic

The time to repeat for the interval attribute is in milliseconds.

Long Press

Any callback can be invoked when the button is pressed and held.

Basic

The long press time is set numerically in the delay attribute,callback sets the function object to delayFn.

Attributes

PropsDefaultType
variants'default''default' | 'primary' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'