Hoppa till innehåll

RadioButton

Terminal window
npm install @sk-web-gui/react
import { RadioButton } from '@sk-web-gui/react';
PropTypStandardBeskrivning
invalidbooleanMakes radio invalid
requiredReact.InputHTMLAttributes<T>['required']Makes radio required
readOnlyReact.InputHTMLAttributes<T>['readOnly']Makes radio readOnly
disabledReact.InputHTMLAttributes<T>['disabled']Makes radio disabled
defaultCheckedbooleanIf true, the radio will be initially checked.
checkedbooleanIf true, the radio will be checked. You’ll need to pass onChange to update it’s value (since it’s now controlled)
onChangeReact.ChangeEventHandler<HTMLInputElement>The callback invoked when the checked state of the radio changes..
size'sm' | 'md' | 'lg'Size of the radio @default md
childrenReact.ReactNodeThe children is the label to be displayed to the right of the radio.
  • Template – standardstory
  • Invaliderad – standardstory
  • Inaktiverad – standardstory
  • Storlekar – standardstory
  • FormControlComp – standardstory