Button
A element that allows users to trigger actions and events, comes with interactive styles.
Import
import { Button } from "@sparrowengg/twigs-react";Usage
<Button color="primary" size="md">
Click me
</Button>Examples
Button variants and with icons
Button states
Props
Button
| Prop | Type | Default |
|---|---|---|
size? | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | sm |
color? | 'default' | 'primary' | 'secondary' | 'bright' | 'light' | 'error' | primary |
variant? | 'solid' | 'ghost' | 'outline' | solid |
loading? | boolean | false |
disabled? | boolean | false |
leftIcon? | ReactElement | - |
rightIcon? | ReactElement | - |
icon? | ReactElement | - |
loader? | ReactElement | 'line' | 'circle' | 'line' |
css? | object | - |