Select example

With disabled options

Options can be disabled using the disabled parameter. Note that it is possible to have an option that is both disabled and selected.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/select", {
  id: "dropdown2-0",
  label: "Option 3 disabled",
  options: [
    {
      text: "Option one",
      value: "option1"
    },
    {
      text: "Option two",
      value: "option2"
    },
    {
      text: "Option three",
      value: "option3",
      disabled: true
    }
  ]
} %>