naive-ui/demo/documentation/components/button/enUS/index.demo-entry.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

58 lines
1.4 KiB
Markdown

# Button
Button is used to trigger some actions.
## Demos
```demo
basic
size
text
disabled
icon
events
shape
ghost
loading
color
group
```
## Props
### Button Props
|Name|Type|Default|Description|
|-|-|-|-|
|attr-type|`'button' \| 'submit' \| 'reset'`|`'button'`|The DOM `type` attribute of the button.|
|block|`boolean`|`false`||
|circle|`boolean`|`false`||
|color|`string`|`null`|Only support `#FFF`, `#FFFFFF`, `rgb(0, 0, 0)` formatted colors.|
|disabled|`boolean`|`false`||
|ghost|`boolean`|`false`||
|icon-placement|`'left' \| 'right'`|`'left'`||
|keyboard|`boolean`|`true`|Whether is supports keyboard operation.|
|loading|`boolean`|`false`||
|round|`boolean`|`false`||
|size|`'tiny' \| 'small' \| 'medium' \| 'large'`|`'medium'`||
|text|`boolean`|`false`||
|theme|`'light' \| 'dark' \| null`|`null`||
|type|`'default' \| 'primary' \| 'success' \| 'info' \| 'warning' \| 'error'`|`'default'`||
### Button Group Props
|Name|Type|Default|Description|
|-|-|-|-|
|size|`'tiny' \| 'small' \| 'medium' \| 'large'`|`null`|The buttons' size in button group. If set, the button's size prop inner group won't work.|
|vertical|`boolean`|`false`||
## Slots
### Button Slots
|Name|Parameters|Description|
|-|-|-|
|default|`()`||
|icon|`()`||
### Button Group Slots
|Name|Parameters|Description|
|-|-|-|
|default|`()`||
## Events
### Button Events
|Name|Parameters|Description|
|-|-|-|
|click|`(e: MouseEvent)`||