RadioButton
Installation
Section titled “Installation”npm install @sk-web-gui/reactAnvändning
Section titled “Användning”import { RadioButton } from '@sk-web-gui/react';| Prop | Typ | Standard | Beskrivning |
|---|---|---|---|
invalid | boolean | – | Makes radio invalid |
required | React.InputHTMLAttributes<T>['required'] | – | Makes radio required |
readOnly | React.InputHTMLAttributes<T>['readOnly'] | – | Makes radio readOnly |
disabled | React.InputHTMLAttributes<T>['disabled'] | – | Makes radio disabled |
defaultChecked | boolean | – | If true, the radio will be initially checked. |
checked | boolean | – | If true, the radio will be checked. You’ll need to pass onChange to update it’s value (since it’s now controlled) |
onChange | React.ChangeEventHandler<HTMLInputElement> | – | The callback invoked when the checked state of the radio changes.. |
size | 'sm' | 'md' | 'lg' | – | Size of the radio @default md |
children | React.ReactNode | – | The children is the label to be displayed to the right of the radio. |
Storyvarianter
Section titled “Storyvarianter”- Template – standardstory
- Invaliderad – standardstory
- Inaktiverad – standardstory
- Storlekar – standardstory
- FormControlComp – standardstory
- Implementation: @sk-web-gui/forms
- Storybook: RadioButton