Input element that allows the user to choose one of several options.

On this page:

🚧 This documentation is a work in progress.


Radio buttons are often used in forms to collect input from the user where they need to choose only one of several options from a list.


RadioButtons anatomy

  1. Title - Question or instruction.
  2. Current Selection - Indicates the selected option.
  3. Option - Enables this option and disables the current selection.
  4. Label - Text label associated with the radio button.


  • Radio buttons should always have an associated label on the right side.

Best Practices

  • List options in a logical order:
    • most likely to least likely to be selected
    • simplest to most complex operation
    • least to most risk
  • Preselect one option. Choose the safest, most secure, and private option first. If safety and security are not important, choose the most likely or convenient option.
  • If users should have the option to avoid making a selection, add a “None” (or equivalent) option.
  • If you cannot have a list of all possible options, add an “Other” option.
  • Avoid alphabetical sorting as it is language-dependent and not localizable.
  • Avoid overlapping options. For example, Select age: 0-20, 20-40 — What do you choose if your age is 20?
  • Include all relevant options. For example, Select age: Below 20, Above 20 — What do you choose if you are 20?

Content guidelines

  • Keep labels short and descriptive.
  • Start all labels with a capital letter.
  • Do not include punctuation after labels.
  • For a more compact way to display multiple options with single selection, use Dropdown.
  • If users can choose multiple options from a list, use Checkboxes.
  • For a more compact way to display multiple options with multiple selection, use MultipleSelect.


The following is an autogenerated list of the properties available for RadioButtons based on the component’s JSON schema file (linked below).

We are currently updating how we implement components, and the list of properties may not be entirely accurate.

JSON schema

Required properties: id,type



stringThe component ID. Must be unique within all layouts/pages in a layout-set. Cannot end with <dash><number>.


stringThe component type.


objectData model bindings for component
basicDataModelBindings.simpleBindingstringData model binding for components connection to a single field in the data model


objectText resource bindings for a component.
basicTextResources.descriptionstringThe description text for the component
basicTextResources.helpstringThe help text for the component
basicTextResources.shortNamestringThe short name for the component (used in validation messages) (optional). If it is not specified, 'title' text is used.
basicTextResources.tableTitlestringThe text shown in column title when component is used in repeating group (optional). If it is not specified, 'title' text is used.
basicTextResources.titlestringThe title/label text for the component


booleanBoolean or expression indicating if the component is required when filling in the form. Defaults to false.


booleanBoolean or expression indicating if the component should be presented as read only. Defaults to false. <br /> <i>Please note that even with read-only fields in components, it may currently be possible to update the field by modifying the request sent to the API or through a direct API call.<i/>
options.labelstringThe option label. Can be plain text or a text resource binding.
options.valuestringThe option value.


stringReference to connected options by id.


stringThe HTML autocomplete attribute lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the browser as to the type of information expected in the field.
Enum: [on, off, name, honorific-prefix, given-name, additional-name, family-name, honorific-suffix, nickname, email, username, new-password, current-password, one-time-code, organization-title, organization, street-address, address-line1, address-line2, address-line3, address-level4, address-level3, address-level2, address-level1, country, country-name, postal-code, cc-name, cc-given-name, cc-additional-name, cc-family-name, cc-number, cc-exp, cc-exp-month, cc-exp-year, cc-csc, cc-type, transaction-currency, transaction-amount, language, bday, bday-day, bday-month, bday-year, sex, tel, tel-country-code, tel-national, tel-area-code, tel-local, tel-extension, url, photo]


objectSettings for the components grid. Used for controlling horizontal alignment.
Example(s): {xs: 12}
gridSettings.innerGridgridPropsOptional grid for inner component content like input field or dropdown. Used to avoid inner content filling the component width.
Example(s): {xs: 12}
See: gridProps
gridSettings.labelGridgridPropsOptional grid for the component label. Used in combination with innerGrid to align labels on the side.
Example(s): {xs: 12}
See: gridProps


booleanBoolean value or expression indicating if the component should be hidden. Defaults to false.


mappingOptionally used to map options


Example(s): {some.source.field: key1}


pageBreak.breakAfterstringPDF only: Value or expression indicating whether a page break should be added after the component. Can be either: 'auto' (default), 'always', or 'avoid'.
Example(s): auto,always,avoid
pageBreak.breakBeforestringPDF only: Value or expression indicating whether a page break should be added before the component. Can be either: 'auto' (default), 'always', or 'avoid'.
Example(s): auto,always,avoid


integerSets a preselected index.


booleanBoolean or expression indicating if the component should be rendered as a summary. Defaults to false.


booleanBoolean value indicating if the options should be instance aware. Defaults to false. See more on docs:


booleanBoolean value indicating if the options should be displayed as cards. Defaults to false.


objectObject to define a data model source to be used as basis for options. Can not be used if options or optionId is set. See more on docs:
source.descriptionstringA description of the option displayed in Radio- and Checkbox groups. Can be plain text or a text resource binding.
Example(s): some.text.key,My Description
source.groupstringThe repeating group to base options on.
source.helpTextstringA help text for the option displayed in Radio- and Checkbox groups. Can be plain text or a text resource binding.
Example(s): some.text.key,My Help Text
source.labelstringReference to a text resource to be used as the option label.
Example(s): some.text.key
source.valuestringField in the group that should be used as value


We are currently updating Altinn Studio Designer with more configuration options! The documentation is continuously updated, and there may be more settings available than what is described here, and some settings may be in beta version.

Add component

    You can add a component in Altinn Studio Designer by dragging it from the list of components to the page area. Selecting the component brings up its configuration panel.

    Basic component:

      "$schema": "",
        "data": {
          "layout": [
              "id": "radio-buttons",
              "type": "RadioButtons"

    Text (textResourceBindings)

      You can create a new text by clicking on the plus sign or select an existing one by clicking on the magnifying glass. See Adding and Editing Texts in an App for more information.

      Text settings
      Text settings

      Text can be added directly as a text string or by providing the key to a [text resource].(/app/development/ux/texts/#add-and-change-texts-in-an-application).

        "id": "komponent-id",
        "type": "RadioButtons",
        "textResourceBindings": {
                "title": "",
                "description": "",
                "help": "",
                "shortName": "",
                "tableTitle": ""

      Text anatomy

      Text Anatomy. Screenshot

      1. Ledetekst (textResourceBindings.title): A heading with a question or instruction.
      2. Beskrivelse (textResourceBindings.description): Description. Text for further description or elaboration.
      3. Hjelpetekst ( Help text. When help text is filled out, a question mark will appear next to the heading. Click on the question mark to display the text as a popup. Can be used for explanations, examples, use cases, etc.
      • Kortnavn (textResourceBindings.shortName): Short name. Overrides the title of the component used in the default required validation message.
      • Tittel i tabell (textResourceBindings.tableTitle): Table title. Overrides the title of the component used in column headers when the component is within repeating groups.

      Data Model

      To store and manipulate the data collected by the component, the component must be linked to a field in a data model.

        Select the field you want to link the component to from the dropdown menu. If there are no fields available, you must first upload a data model.

        Data Model Settings. Screenshot

        Insert the name of the field you want to link the component to within curly braces under dataModelBindings.

          "id": "komponent-id",
          "dataModelBindings": {
            "simpleBinding": "MyDataModel.SomeField"

        Adding options

        Options (radio buttons) can be added manually or by using code lists.

        Manually (options)

          Select “Manuelt” and click “Legg til flere” to add a new option. Choose or create a new text to add a label (label).

          The radio button comes with a pre-filled value (value), which is the data that is stored when the user makes a selection. The value is stored as a string and can be changed as you wish.

          Manually Added radio buttons settings
          Manually Added radio buttons
            "id": "komponent-id",
            "type": "RadioButtons",
            "options": [
                      "label": "Ja",
                      "value": "ja"
                      "label": "Nei",
                      "value": "nei"

          Code List (optionsId)

          A code list is a predefined list of options.

            To add options from a code list, select “Kodeliste” and enter a code list ID. To use a custom (dynamic) code list, click “Bytt til egendefinert kodeliste” (switch to custom code list).

            Code List Settings. Screenshot
            Code List Settings

            If you wish to secure dynamic code lists, you can check this option:

            Secured API Setting

              "id": "komponent-id",
              "optionsId": "land",
              "secure": true

            Kilde (source)

            Another way to add options is by linking the component to a code list based on form data stored within the app itself. You can do this by adding a source (source); please refer to the documentation for instructions on how to configure this.

              Settings for source
                "id": "komponent-id",
                "source": {
                  "group": "",
                  "label": "option.label",
                  "value": "[{0}].someField",
                  "description": "Some description",
                  "helpText": "Some help text"

              Documentation for code lists

              RadioButtons settings

                Settings for readOnly, required, layout, card, and preselect
                  "id": "komponent-id",
                  "readOnly": false,
                  "required": true,
                  "layout": "row",
                  "showAsCard": true
                  "preselectedOptionsIndex": 0
                • Feltet skal være skrivebeskyttet (readOnly): Field is read-only. Disables the component when checked (true). The component is dimmed and it’s not possible to select an option.
                • Feltet skal være påkrevd (required): Field is required when checked (true). Indicated by a star next to the title.
                • Visning (layout): Layout. Can be column (column) (default for more than two options) or row (row) (default for up to two options).
                • Vis som “cards” (showAsCard): Displays each radio button on a light gray background when checked (true).
                • Forhåndsvalgt verdi (preselectedOptionsIndex): Sets a preselected value. Options are zero-indexed, so the first option is 0, the second is 1, and so on.


                Example skrivebeskyttet. Skjermbilde
                Example visning row og påkrevd. Skjermbilde
                Layout 'row' and required
                Example cards
                Vis som "cards"

                General settings

                  Settings for summary and hidden

                  Setting for page break

                    "id": "komponent-id",
                    "renderAsSummary": false,
                    "hidden": false,
                    "pageBreak": {
                      "breakBefore": "auto",
                      "breakAfter": "auto"
                  • Oppsummering (renderAsSummary): Indicates whether the field should be included in a summary or not (default: false).
                  • Feltet skal skjules (hidden): Indicates whether the field should be hidden or not (default: false).
                  • PDF-innstillinger (pageBreak): Indicates whether a page break should be added before or after the component. Can be either: auto (default), always, or avoid.

                  The following settings are not yet supported in the form editor but can be configured manually.

                  Horizontal alignment with grid

                  The grid property controls horizontal alignment based on a 12-column layout. Items are allocated fractions of 12 which sets their width relative to the screen width. In the example below, we set the component’s width to 2/12 of the screen width for all screen sizes (from xs and up).

                      "id": "komponent-id",
                      "grid": {
                          "xs": 2,

                    You can also use grid to place items side by side.

                    See Components placed side by side (grid) for details and examples.