Documentation

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

PropTypeDefaultDescription
labelstring-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
classNamestring-Additional CSS classes
Edit on GitHub

Last updated on

On this page