Button
A clickable element styled as a button, suitable for various actions and interfaces.
Usage
API Reference
In addition to all the props defined as ButtonHTMLAttributes<HTMLButtonElement>
, Button
component also includes the following props:
Prop | Value | Default |
---|---|---|
after | ReactElement<HTMLElement> | / |
asChild | boolean | false |
before | ReactElement<HTMLElement> | / |
destructive | boolean | false |
disabled | boolean | false |
isIconOnly | boolean | false |
shape | "rounded" | "pill" | "rounded" |
size | "xs-icon" | "sm" | "md" | "md" |
variant | "primary" | "secondary" | "tertiary" | "outline" | "transparent" | "link" | "primary" |
Examples
The following example shows different variants of the Button
component.
The following example shows various Button
components with "sm"
size prop.
Next example shows different destructive Button
components.