Option select example

With option pre checked

How it looks (preview)

List of options

List of options

How to call this example

<%= render "govuk_publishing_components/components/option_select", {
  key: "with_checked_value_set",
  title: "List of options",
  options_container_id: "list_of_vegetables",
  options: [
    {
      value: "potatoes",
      label: "Potatoes",
      checked: true
    },
    {
      value: "carrots",
      label: "Carrots",
      id: "carrots"
    },
    {
      value: "mash",
      label: "Mash",
      id: "mash"
    }
  ]
} %>