Radioknapp
- Komponent
- 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.
Props
- 
                            id: stringOptional
- 
                            The id for the fieldset id attribute. If the prop is not set a random value will be generated. Default: () => ElementIdService.generateElementId()
- 
                            name: stringOptional
- 
                            Name provided to child content as sharedNamefor optional usage (it will not be set on the fieldset element). For radio inputs this is a shortcut to specify the shared name attribute at one place, instead of repeatedly setting the name attribute on each radio input.Default: undefined
- 
                            labelClass: stringOptional
- 
                            The CSS classes for the label, description and error-message slot. Default: ""
- 
                            contentClass: stringOptional
- 
                            The CSS classes for the default slot. Default: ""
- 
                            horizontal: booleanOptional
- 
                            Aligns underlying items horizontally. Supported by radiobuttons and chip layout. 
- 
                            chip: booleanOptional
- 
                            Displays radio and checkbox content with chip layout. 
- 
                            border: booleanOptional
- 
                            Displays a box with border around radiobuttons and checkboxes. 
- 
                            showDetails: stringOptional
- 
                            Sets visibility behaviour for details slot in selectable child items. By default details slot is not rendered. - never(default) - Never show item details.
 - when-selected- Show item details when selected.
- always- Always show item details.
 Default: "never"
Slots
- 
                            label
- 
                            Slot for label content. This slot is required. 
- 
                            description
- 
                            Optional slot for description. See FLabelfor details.Bindings: - description-class: string[]— CSS classes for primary description content.
- format-description-class: string[]— CSS classes for format description.
 
- 
                            error-message
- 
                            Slot for label content. This slot is required. Bindings: - hasError: boolean— Set to true when a validation error is present
- validationMessage: string— Descriptive validation error message for current error
 
- 
                            tooltip
- 
                            Slot for tooltip. 
- 
                            default
- 
                            Slot for fieldset content. 
FRadioField
Ersätter FRadioGroupField.
Models
- 
                            v-model: anyTypeOptional
- 
                            The value for the input checked attribute. Default: () => undefined
Props
- 
                            disabled: booleanOptional
- 
                            Set to true, empty string""or string"disabled"to disable this input field.
- 
                            id: stringOptional
- 
                            The id for the input id attribute. The id for the label for attribute. If the prop is not set a random value will be generated. Default: () => ElementIdService.generateElementId()
- 
                            value: anyTypeOptional
- 
                            The value for the input. Default: () => undefined
Events
- 
                            change
- 
                            Emitted when the value of the radiobutton changes. Arguments: - <anonymous>: anyType