Radio

One option in a mutually exclusive set.

Give standalone Radio inputs a common name, or place them in RadioGroup. description adds text below the label.

Live example

Example controls

Usage

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

<Radio
  name='role'
  value='design'
>
  Design
</Radio>;

Component API

PropType / variantsPurposeDefault
childrenstringComponent content.—
size's' | 'm's · mComponent size.m
labelPlace'left' | 'right'left · rightLabel position relative to the control.right
checkedbooleanCurrent selected state.false
disabledbooleanDisables interaction.false
descriptionReactNodeSecondary text below the label.—
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.—
wrapperClassNamestringClass of the outer wrapper.—
textClassNamestringClass of the text part.—

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