Skip to content

Commit c16b04c

Browse files
云水云水
authored andcommitted
doc: add check box doc
1 parent c6c61dd commit c16b04c

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

doc/markdown/nCheckbox/en-US/index.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Checkbox(developing)
2+
3+
Checkbox
4+
5+
6+
## When To Use
7+
Used for selecting multiple values from several options.
8+
9+
If you use only one checkbox, it is the same as using Switch to toggle between two states. The difference is that Switch will trigger the state change directly, but Checkbox just marks the state as changed and this needs to be submitted.
10+
11+
## Examples
12+
### Basice Use
13+
Easy checkbox
14+
:::demo
15+
```html
16+
<template>
17+
<n-checkbox :checked="true">Checkbox</n-checkbox>
18+
</template>
19+
20+
```
21+
:::
22+
23+
### Disabled
24+
checkbox Disabled.
25+
:::demo
26+
```html
27+
<template>
28+
<n-checkbox :disabled="true" :checked="true">Checkbox</n-checkbox>
29+
<n-checkbox :disabled="true" :checked="false">Checkbox</n-checkbox>
30+
</template>
31+
32+
```
33+
:::
34+
35+
## API
36+
37+
| Property | Description | Type | Default |
38+
| :--- | :--- | :--- | :--- |
39+
| checked | is checked | Boolean | false |
40+
| defaultChecked | defaultChecked | Boolean | false |
41+
| disabled | disabled | Boolean | false |
42+
| onChange | onChange | Function | |

0 commit comments

Comments
 (0)