Buttons are used to trigger some actions.
Examples
Basic
Basic
Enable elevation
Enable elevation effect, only work on variant=contained.
Disabled ripple
Disabled ripple.
Disabled state
When the button is disabled, the ripple effect and shadow of variant=contained will not work.
Size
Set buttons of different sizes by size.
Loading
The loading state is used for scenarios that require a period of processing to continue operation
Long
By setting long to the button, the button can occupy a whole row.
Properties
For other parameters, please refer to BaseButton
| Property | Description | Type | Default | Require |
|---|---|---|---|---|
| href | Click the jump address, the button behavior is the same as the a tag | string | - | false |
| disabled | Disable State | boolean | false | false |
| color | Set button theme color | default | primary | success | warning | error | default | false |
| variant | Set button type | contained | outlined | text | contained | false |
| long | Long button | boolean | false | false |
| prefixIcon | Prefix icon | React.ReactElement | - | false |
| suffixIcon | Suffix icon | React.ReactElement | - | false |
| loading | Set the button as loading state | boolean | - | false |
| round | Round button | boolean | - | false |
| disableElevation | Shadow effect is forbidden, only valid for variant=contained | boolean | - | false |
| children | Child node, can be empty when prefixIcon or suffixIcon is specified | React.ReactNode | - | false |
| size | Button Size | middle | large | small | middle | false |