The Button component provides a flexible and accessible way to trigger actions in your application. It supports multiple visual variants, loading states, and can be customized with icons.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raystack/apsara/llms.txt
Use this file to discover all available pages before exploring further.
Basic usage
Props
The visual style variant of the button.
The color theme of the button.
The size of the button.
Whether the button is disabled.
Whether the button is in a loading state. Shows a spinner when true.
Text to display alongside the loading spinner.
Icon element to display before the button text.
Icon element to display after the button text.
Maximum width of the button.
Width of the button.
Additional inline styles to apply to the button.
Additional CSS classes to apply to the button.
The content to display inside the button.
Variants
Solid
The default filled button style.Outline
A button with a border and transparent background.Ghost
A minimal button with no border or background in its default state.Text
A text-only button with no background or border.Colors
Sizes
With icons
Loading state
Disabled state
Custom width
Accessibility
- The Button component is built on Base UI’s Button primitive, ensuring proper accessibility.
- It maintains focus states and keyboard navigation.
- When in loading state, the button becomes focusable even when disabled using
focusableWhenDisabled. - Ensure to provide meaningful button text or
aria-labelfor icon-only buttons.