kopia lustrzana https://github.com/shoelace-style/shoelace
729 B
729 B
Radio Group
[component-header:sl-radio-group]
Radio Groups are used to group multiple radios so they function as a single control.
<sl-radio-group label="Select an item">
<sl-radio value="1" checked>Item 1</sl-radio>
<sl-radio value="2">Item 2</sl-radio>
<sl-radio value="3">Item 3</sl-radio>
</sl-radio-group>
Examples
Showing the Fieldset
You can show a fieldset and legend that wraps the radio group using the fieldset
attribute.
<sl-radio-group label="Select an item" fieldset>
<sl-radio value="1" checked>Item 1</sl-radio>
<sl-radio value="2">Item 2</sl-radio>
<sl-radio value="3">Item 3</sl-radio>
</sl-radio-group>
[component-metadata:sl-radio-group]