InlineRadio

A compact radio option.

Use InlineRadioGroup for several mutually exclusive options. rounded makes it a pill, badge adds a badge, and leftIcon and rightIcon add icons. The option is keyboard accessible.

Live example

Example controls

Usage

import { InlineRadio } from '@prosazhin/pbcomponents';

<InlineRadio value='design'>Design</InlineRadio>;

Component API

PropType / variantsPurposeDefault
childrenstringComponent content.—
size's' | 'm's · mComponent size.m
checkedbooleanCurrent selected state.false
disabledbooleanDisables interaction.false
roundedbooleanRounded pill shape.false
indicatorbooleanHighlight of the selected choice.true
badgeReactElement<BadgeProps>Badge to the right of the label.—
leftIconSvgTypenone · check · search · userIcon before the text; accepts an SVG component.—
rightIconSvgTypenone · check · search · userIcon after the text; accepts an SVG component.—
leftIconClassNamestringClass of the left icon.—
rightIconClassNamestringClass of the right icon.—
valuestringChoice value.—
namestringNative radio group name.—
onChange(checked: boolean, value: string, event: InputEvent) => voidReports the new checked state and item value.—
classNamestringClass of the root element.—
textClassNamestringClass of the text part.—

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