mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
docs(radio-button): add "Hidden legend" example
This commit is contained in:
parent
b2d93e55ac
commit
cfb9fa07b1
1 changed files with 12 additions and 0 deletions
|
@ -41,6 +41,18 @@ Use the named "legendText" slot to customize the legend text.
|
||||||
<RadioButton labelText="Pro (128 GB)" value="pro" />
|
<RadioButton labelText="Pro (128 GB)" value="pro" />
|
||||||
</RadioButtonGroup>
|
</RadioButtonGroup>
|
||||||
|
|
||||||
|
### Hidden legend
|
||||||
|
|
||||||
|
It's recommended that you provide a legend for accessibility.
|
||||||
|
|
||||||
|
Use `hideLegend` to visually hide the legend text.
|
||||||
|
|
||||||
|
<RadioButtonGroup hideLegend legendText="Storage tier (disk)" selected="standard">
|
||||||
|
<RadioButton labelText="Free (1 GB)" value="free" />
|
||||||
|
<RadioButton labelText="Standard (10 GB)" value="standard" />
|
||||||
|
<RadioButton labelText="Pro (128 GB)" value="pro" />
|
||||||
|
</RadioButtonGroup>
|
||||||
|
|
||||||
### Reactive example
|
### Reactive example
|
||||||
|
|
||||||
Use the `selected` prop to bind and update the selected value.
|
Use the `selected` prop to bind and update the selected value.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue