Skip to content

Commit d86d0d5

Browse files
committed
docs: clarify Radio component as Toggle variant
- Add explanation that Radio is part of the Toggle component system - Document the inputDetailStyle prop for customizing the dot indicator - Add usage example Fixes #3021
1 parent 2acacd3 commit d86d0d5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/boilerplate/app/components/Radio.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ import ToggleProps from './\_toggle_props.mdx';
66

77
# Radio
88

9-
The `Radio` component provides a simple way to collect user input for a boolean value.
9+
This is the `Radio` variant of the [Toggle component](https://github.com/infinitered/ignite/blob/master/boilerplate/app/components/Toggle/Toggle.tsx). It renders a circular toggle with an inner dot indicator.
10+
11+
```tsx
12+
<Radio value={value} onValueChange={setValue} />
13+
```
14+
15+
## Radio Props
16+
17+
### `inputDetailStyle`
18+
19+
The `inputDetailStyle` prop allows you to customize the inner dot indicator. This affects the small circular dot that appears when the radio is in the "on" state.
20+
21+
```tsx
22+
<Radio
23+
value={value}
24+
onValueChange={setValue}
25+
inputDetailStyle={{ backgroundColor: "red", width: 16, height: 16 }}
26+
/>
27+
```
1028

1129
<ToggleProps componentName="Radio" />

0 commit comments

Comments
 (0)