Button
Interactive element that initiates an action, with a label or icon describing the outcome.
API Reference
Usage
Properties
The Button
component extends the Bits UI <Button>
component. Find the full list of available properties in the official Bits UI documentation.
Button
Prop | Type | Default |
---|---|---|
variant | string | default |
disabled | boolean | false |
loading | boolean | false |
leadingIcon | ComponentType | - |
trailingIcon | ComponentType | - |
ButtonIcon
Prop | Type | Default |
---|---|---|
variant | string | default |
size | string | medium |
disabled | boolean | false |
loading | boolean | false |
Examples
Variants
Use the variant
property to change the appearance of the button.
Disabled
Use the disabled
property to disable the button.
Loading
Use the loading
property to show a loading indicator.
Icon support
Use the leadingIcon
and trailingIcon
properties to add an icon to the button.
Button icon
Use the ButtonIcon
component to create icon-only buttons.
Button icon size
Use the size
property to change the size of the button icon.
Link
Use the href
property to create a link button.