Overview
The Button component is used to trigger actions in your application. It supports text, icons, multiple variants, sizes, colors, and loading states.Basic Usage
Props
Variant of the button.Available choices:
primary (solid), secondary (outlined), tertiary (borderless), text (transparent background and no padding)Color theme of the button.Available choices:
brand, neutral, error, success, warning, yellow, purpleSize of the button.Available choices:
extra-small, small, medium, large, extra-largeIcon to be displayed in the button.
Size of the icon.
Position of the icon.Available choices:
left, rightShow that the button is inactive.
Show that the button is in loading state. Displays a loading spinner.
Make the button take full width of its container.
HTML button type attribute.Available choices:
button, submit, resetFunction to be called when the button is clicked.
Additional CSS classes to be added to the component.
Additional inline styles to be applied to the element.
Tooltip text to be displayed on hover (uses the
title attribute).Aria label for accessibility.
Tab index of the button for keyboard navigation.
Show button animation on click (scales to 95% of its size).
Function to be called on mouse enter event.
Function to be called on mouse leave event.
Variants
Buttons come in four visual variants:Colors
Sizes
With Icons
Loading State
Disabled State
Full Width
Icon Button
For icon-only buttons, use theIconButton component: