Button
Used to trigger an operation.
Import
import { Button } from 'raw-ui';Types
Sizes
Variant
Outline
Ghost
Shadow
Loading
Disabled
Icons
API
| Prop | Description | Type | Default |
|---|---|---|---|
| type | button type | 'default' | 'primary' | 'success' | 'warning' | 'error' | 'default' |
| size | button size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' |
| variant | button variant | 'outline' | 'ghost' | 'shadow' | 'outline' |
| loading | set the loading status of button | boolean | false |
| disabled | disable button | boolean | false |
| icon | render an icon on the left of the text | React.ReactNode | - |
| iconRight | render an icon on the right of the text | React.ReactNode | - |
| onClick | click handler | React.MouseEventHandler | - |
| ... | native props | React.ButtonHTMLAttributes | - |