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

PropType / variantsPurposeDefault
childrenInlineRadio[]Choices in one row.—
size's' | 'm's · mComponent size.—
roundedbooleanRounded choices for the whole group.false
disabledbooleanDisables interaction.false
namestringShared name of the native inputs.—
valuestringSelected value.—
defaultValuestringInitial value when uncontrolled.—
onChange(value: string) => voidReports the new selected value.—
classNamestringClass of the root element.—

Native HTML attributes are accepted where the component renders the corresponding element. className props only affect styling.