InlineRadioGroup
A group of compact radio options.
Pass InlineRadio elements as children. Control selection through value or defaultValue; onChange returns the selected value. rounded makes every option in the group rounded.
Live example
Example controls
Usage
import { InlineRadio, InlineRadioGroup } from '@prosazhin/pbcomponents';
<InlineRadioGroup defaultValue='One'>
{['One', 'Two', 'Three', 'Four', 'Five'].map((item) => (
<InlineRadio
key={item}
value={item}
>
{item}
</InlineRadio>
))}
</InlineRadioGroup>;Component API
| Prop | Type / variants | Purpose | Default |
|---|---|---|---|
children | InlineRadio[] | Choices in one row. | — |
size | 's' | 'm's · m | Component size. | — |
rounded | boolean | Rounded choices for the whole group. | false |
disabled | boolean | Disables interaction. | false |
name | string | Shared name of the native inputs. | — |
value | string | Selected value. | — |
defaultValue | string | Initial value when uncontrolled. | — |
onChange | (value: string) => void | Reports the new selected value. | — |
className | string | Class of the root element. | — |
Native HTML attributes are accepted where the component renders the corresponding element. className props only affect styling.