mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Update examples
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
Checkboxes allow the user to toggle an option on or off.
|
||||
|
||||
```html preview
|
||||
<sl-checkbox>Checkbox</sl-checkbox><br>
|
||||
<sl-checkbox>Checkbox</sl-checkbox>
|
||||
```
|
||||
|
||||
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
|
||||
@@ -17,7 +17,7 @@ Checkboxes allow the user to toggle an option on or off.
|
||||
Use the `checked` attribute to activate the checkbox.
|
||||
|
||||
```html preview
|
||||
<sl-checkbox checked>Checked</sl-checkbox><br>
|
||||
<sl-checkbox checked>Checked</sl-checkbox>
|
||||
```
|
||||
|
||||
### Indeterminate
|
||||
@@ -25,7 +25,7 @@ Use the `checked` attribute to activate the checkbox.
|
||||
Use the `indeterminate` attribute to make the checkbox indeterminate.
|
||||
|
||||
```html preview
|
||||
<sl-checkbox indeterminate>Indeterminate</sl-checkbox><br>
|
||||
<sl-checkbox indeterminate>Indeterminate</sl-checkbox>
|
||||
```
|
||||
|
||||
### Disabled
|
||||
@@ -33,7 +33,7 @@ Use the `indeterminate` attribute to make the checkbox indeterminate.
|
||||
Use the `disabled` attribute to disable the checkbox.
|
||||
|
||||
```html preview
|
||||
<sl-checkbox disabled>Disabled</sl-checkbox><br>
|
||||
<sl-checkbox disabled>Disabled</sl-checkbox>
|
||||
```
|
||||
|
||||
[component-metadata:sl-checkbox]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Radios allow the user to select one option from a group of many.
|
||||
|
||||
```html preview
|
||||
<sl-radio>Radio</sl-radio><br>
|
||||
<sl-radio>Radio</sl-radio>
|
||||
```
|
||||
|
||||
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
|
||||
@@ -17,7 +17,7 @@ Radios allow the user to select one option from a group of many.
|
||||
Use the `checked` attribute to activate the radio.
|
||||
|
||||
```html preview
|
||||
<sl-radio checked>Checked</sl-radio><br>
|
||||
<sl-radio checked>Checked</sl-radio>
|
||||
```
|
||||
|
||||
### Disabled
|
||||
@@ -25,12 +25,12 @@ Use the `checked` attribute to activate the radio.
|
||||
Use the `disabled` attribute to disable the radio.
|
||||
|
||||
```html preview
|
||||
<sl-radio disabled>Disabled</sl-radio><br>
|
||||
<sl-radio disabled>Disabled</sl-radio>
|
||||
```
|
||||
|
||||
### Grouping Radios
|
||||
|
||||
Radios are grouped based on their `name` attribute.
|
||||
Radios are grouped based on their `name` attribute and scoped to the nearest form.
|
||||
|
||||
```html preview
|
||||
<sl-radio name="option" checked>Option 1</sl-radio><br>
|
||||
|
||||
@@ -17,7 +17,7 @@ Switches allow the user to toggle an option on or off.
|
||||
Use the `checked` attribute to activate the switch.
|
||||
|
||||
```html preview
|
||||
<sl-switch checked>Checked</sl-switch><br>
|
||||
<sl-switch checked>Checked</sl-switch>
|
||||
```
|
||||
|
||||
### Disabled
|
||||
@@ -25,7 +25,7 @@ Use the `checked` attribute to activate the switch.
|
||||
Use the `disabled` attribute to disable the switch.
|
||||
|
||||
```html preview
|
||||
<sl-switch disabled>Disabled</sl-switch><br>
|
||||
<sl-switch disabled>Disabled</sl-switch>
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user