Radio

Radios are used when only one option can be selected.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Usage

import { RadioButton } from 'bio-bind-ui';
<RadioButton
  id=''
  label='Label'
  labelPosition='right'
  mode='light'
  name='radio'
  onChange={() => {}}
  size='md'
  style={{}}
  variant='primary'
/>

Examples

Radio Variant

Set the variant prop to primary or secondary for different style.

Radio Size

Set the size prop to sm, md or lg for different size.


Label Position (optional)

Use labelPosition to set label right or left


Mode (optional) Use mode to use dark or light


Props

PropsRequiredDefaultTypedescription
labeltrue-stringThe label text for the radio.
labelPositionfalserightleft rightThe label position to the radio.
stylefalse-CSSPropertiesCustom styles for the radio component.
modefalselightlight darkThe theme mode of the radio (light or dark).
idfalse-stringA unique identifier for the radio.
namefalse-stringName for the radio.
variantfalseprimaryprimary secondaryThe visual color variant of the radio.
sizefalsemdsm md lgThe size of radio.
disabledfalsefalsetrue falseIf true, radio will be set to disabled state
checkedfalsefalsetrue falseIf true, radio will be set to checked state.
isErrorfalsefalsetrue falseIf true, radio will be set to error state.
onChangefalse-(event: React.ChangeEvent<HTMLInputElement>) => voidCallback function to handle when the value of a radio button changes.
BIND © Biofarma Innovate Next-level Design .