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
| Prop | Type / variants | Purpose | Default |
|---|---|---|---|
children | string | Component content. | — |
size | 's' | 'm's · m | Component size. | m |
labelPlace | 'left' | 'right'left · right | Label position relative to the control. | right |
checked | boolean | Current selected state. | false |
disabled | boolean | Disables interaction. | false |
description | ReactNode | Secondary text below the label. | — |
value | string | Choice value. | — |
name | string | Native radio group name. | — |
onChange | (checked: boolean, value: string, event: InputEvent) => void | Reports the new checked state and item value. | — |
className | string | Class of the root element. | — |
wrapperClassName | string | Class of the outer wrapper. | — |
textClassName | string | Class of the text part. | — |
Native HTML attributes are accepted where the component renders the corresponding element. className props only affect styling.