diff --git a/docs/src/pages/components/RadioButton.svx b/docs/src/pages/components/RadioButton.svx index 6bf8a9cb..9b24026e 100644 --- a/docs/src/pages/components/RadioButton.svx +++ b/docs/src/pages/components/RadioButton.svx @@ -7,9 +7,11 @@ components: ["RadioButtonGroup", "RadioButton", "RadioButtonSkeleton"] import Preview from "../../components/Preview.svelte"; +`RadioButton` provides a selection control that allows users to choose a single option from a set. It supports both individual and grouped usage, with options for horizontal and vertical layouts. + ## Default -The `name` prop set on `RadioButtonGroup` is passed to the individual `RadioButton` inputs. +Create a group of radio buttons with a shared name and legend. @@ -19,9 +21,7 @@ The `name` prop set on `RadioButtonGroup` is passed to the individual `RadioButt ## Hidden legend -It's recommended that you provide a legend for accessibility. - -Use `hideLegend` to visually hide the legend text. +Visually hide the legend while maintaining accessibility. @@ -31,7 +31,7 @@ Use `hideLegend` to visually hide the legend text. ## Legend text slot -Use the named "legendText" slot to customize the legend text. +Customize the legend text with additional content.
@@ -49,12 +49,14 @@ Use the named "legendText" slot to customize the legend text. ## Reactive example -Use the `selected` prop to bind and update the selected value. +Bind and update the selected value programmatically. ## Left-aligned label text +Position labels to the left of the radio buttons. + @@ -63,6 +65,8 @@ Use the `selected` prop to bind and update the selected value. ## Disabled buttons +Disable specific radio buttons to prevent selection. + @@ -71,6 +75,8 @@ Use the `selected` prop to bind and update the selected value. ## Vertical orientation +Display radio buttons in a vertical layout. + @@ -79,6 +85,8 @@ Use the `selected` prop to bind and update the selected value. ## Skeleton +Show a loading state for horizontal radio buttons. + @@ -87,6 +95,8 @@ Use the `selected` prop to bind and update the selected value. ## Skeleton (vertical) +Show a loading state for vertical radio buttons. +