Radioknapp
- Komponent
-
FFieldset
,FRadioField
- Status
-
Produktionsklar
Använd radioknappar för att låta en användare välja ett alternativ i en lista.
Saknar du FRadioGroup
-komponenten? Den är deprekerad, för detaljer se migreringsguide.
Radioknappar vs Dropplista
En dropplista bör användas om antalet alternativ är relativt stort eller är om antalet är dynamiskt och därmed kan öka i antal .
Props, Events & Slots
FFieldset
Ersätter FRadioGroup
.
Name | Description | Type | Required | Default |
---|---|---|---|---|
id | The id for the fieldset id attribute. | string | false | () => ElementIdService.generateElementId() |
name | Name provided to child content as | string | false | undefined |
labelClass | The CSS classes for the label, description and error-message slot. | string | false | "" |
contentClass | The CSS classes for the default slot. | string | false | "" |
horizontal | Aligns underlying items horizontally. | boolean | false | ‐ |
chip | Displays radio and checkbox content with chip layout. | boolean | false | false |
border | Displays a box with border around radiobuttons and checkboxes. | boolean | false | ‐ |
showDetails | Sets visibility behaviour for details slot in selectable child items. By default details slot is not rendered.
| string | false | "never" |
Name | Description | Bindings |
---|---|---|
label | Slot for label content. This slot is required. | ‐ |
description | Optional slot for description. See FLabel for details. | descriptionClass |
error-message | Slot for displaying single or several error messages. | hasError |
tooltip | Slot for tooltip. | ‐ |
default | Slot for fieldset content. | ‐ |
FRadioField
Ersätter FRadioGroupField
.
Name | Description | Type | Required | Default |
---|---|---|---|---|
disabled | Set to | boolean | false | false |
id | The id for the input id attribute. | string | false | () => ElementIdService.generateElementId() |
v-model | The value for the input checked attribute. | anyType | false | ‐ |
value | The value for the input. | anyType | true | ‐ |
Name | Description | Properties |
---|---|---|
change | Vue2 v-model event. | <anonymous>: anyType |
update:modelValue | V-model event. | <anonymous>: anyType |
Name | Description | Bindings |
---|---|---|
default | Slot for label content. | ‐ |
details | Slot for details, should only contain short text | height |