Button
A versatile button component that supports multiple states and actions.
Button
The Button component is a versatile control that supports multiple states and actions.
Usage
import { Button } from '@avalabs/builderkit';
// Basic usage
<Button
label="Click me"
action={() => console.log('Button clicked')}
/>
// With loading state
<Button
label="Processing..."
action={() => {}}
status="loading"
/>
// Disabled state
<Button
label="Unavailable"
action={() => {}}
status="disabled"
/>
Props
Prop | Type | Default | Description |
---|---|---|---|
label | string | - | Text to display on the button |
action | () => void | - | Function to execute when button is clicked |
status | 'idle' | 'loading' | 'disabled' | 'idle' | Current state of the button |
className | string | - | Additional CSS classes |
Last updated on 3/10/2025