{
  "about": {
    "name": "GOV.UK app prototype components",
    "description": "Web components that look and behave like the GOV.UK app’s own, for prototyping app journeys in HTML. Generated from the definitions by `npm run catalogue`: don’t edit it by hand.",
    "docs": "https://alphagov.github.io/govuk-mobile-prototype-components/",
    "index": "index.md",
    "schemas": [
      "src/schemas/component.schema.json",
      "src/schemas/pattern.schema.json",
      "src/schemas/template.schema.json"
    ]
  },
  "patterns": [
    {
      "name": "Confirmation",
      "slug": "confirmation",
      "purpose": "Asks the user to confirm an action that is hard or impossible to undo, such as signing out or deleting something, before the app does it. It slides up as a modal, with the question, what will happen, and a choice of going ahead or not.",
      "when": [
        "The user has asked to do something destructive or hard to undo, such as signing out, deleting data or removing an account.",
        "The user needs to know what will happen before they go ahead.",
        "There are exactly two choices: do it, or go back."
      ],
      "avoid": [
        {
          "when": "The action is easy to undo, or loses nothing, such as turning a setting on or off.",
          "instead": {
            "text": "Do it straight away, with no confirmation"
          }
        },
        {
          "when": "The action has already happened, and the screen says so.",
          "instead": {
            "text": "Outcome",
            "pattern": "outcome"
          }
        },
        {
          "when": "The screen explains something, and the user isn't choosing whether to go ahead.",
          "instead": {
            "text": "Information page",
            "pattern": "information-page"
          }
        },
        {
          "when": "The user has more than two choices.",
          "instead": {
            "text": "Settings list, with a row for each choice",
            "pattern": "settings-list"
          }
        }
      ],
      "components": [
        "govuk-app-screen",
        "govuk-app-nav-bar",
        "govuk-app-heading",
        "govuk-app-text",
        "govuk-app-button-stack",
        "govuk-app-button"
      ],
      "screen": "Sign out, the confirmation opened from Settings",
      "notes": [
        "Ask the question in the heading, and say in the text what will happen and whether it can be undone.",
        "Say what the action does on its button, such as Sign out or Delete saved details, not Yes or Confirm.",
        "Its buttons go nowhere of their own. The page listens for clicks on them, by name, confirm or cancel, and goes where the app would, as examples/settings/sign-out.html does. Add works to each button the page acts on.",
        "On iOS it slides up as a sheet over the screen it was opened from. Put it in a govuk-app-sheet, with that screen behind it, to show that."
      ],
      "html": "<govuk-app-screen background=\"modal\">\n  <govuk-app-nav-bar>\n    <govuk-app-nav-bar-item icon=\"close\" name=\"cancel\">Close</govuk-app-nav-bar-item>\n  </govuk-app-nav-bar>\n  <govuk-app-heading level=\"1\" size=\"title-1\">Are you sure you want to delete your saved details?</govuk-app-heading>\n  <govuk-app-text>You’ll need to enter them again the next time you use this service. You cannot undo this.</govuk-app-text>\n  <govuk-app-button-stack slot=\"footer\">\n    <govuk-app-button variant=\"destructive\" name=\"confirm\">Delete saved details</govuk-app-button>\n    <govuk-app-button variant=\"grouped-secondary\" name=\"cancel\">Cancel</govuk-app-button>\n  </govuk-app-button-stack>\n</govuk-app-screen>",
      "card": "patterns/confirmation.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/patterns/confirmation/"
    },
    {
      "name": "Information page",
      "slug": "information-page",
      "purpose": "Explains one thing in a few paragraphs, such as how Face ID works in the app or what data it keeps, under a large title, with a back button and at most one action at the bottom.",
      "when": [
        "The user has opened a row in a list to find out about one thing before they act on it.",
        "The content is a few short paragraphs, and perhaps a bulleted list.",
        "There is one action that follows from reading it, such as changing a setting or asking for data, or none."
      ],
      "avoid": [
        {
          "when": "The screen asks the user to confirm something destructive.",
          "instead": {
            "text": "Confirmation",
            "pattern": "confirmation"
          }
        },
        {
          "when": "The screen tells the user that something has finished.",
          "instead": {
            "text": "Outcome",
            "pattern": "outcome"
          }
        },
        {
          "when": "The user is choosing between several settings or screens.",
          "instead": {
            "text": "Settings list",
            "pattern": "settings-list"
          }
        },
        {
          "when": "The content is long, or changes often, such as guidance from GOV.UK.",
          "instead": {
            "text": "Link to the page on GOV.UK, from a link row in a grouped list"
          }
        }
      ],
      "components": [
        "govuk-app-screen",
        "govuk-app-nav-bar",
        "govuk-app-text",
        "govuk-app-bulleted-list",
        "govuk-app-button-stack",
        "govuk-app-button"
      ],
      "screen": "Face ID and Your app data, opened from Settings",
      "notes": [
        "In a prototype of several pages, use back-href on the navigation bar, set to the page it was opened from, in place of back.",
        "Leave out the bulleted list, or the button stack, if the page doesn't need them.",
        "The button goes nowhere of its own. The page listens for a click on it, by name."
      ],
      "html": "<govuk-app-screen>\n  <govuk-app-nav-bar title=\"Your saved details\" large-title back></govuk-app-nav-bar>\n  <govuk-app-text>The app keeps a few details about you, so you do not have to enter them each time, like:</govuk-app-text>\n  <govuk-app-bulleted-list spacing=\"compact\">\n    <govuk-app-bulleted-list-item>your name</govuk-app-bulleted-list-item>\n    <govuk-app-bulleted-list-item>your postcode</govuk-app-bulleted-list-item>\n  </govuk-app-bulleted-list>\n  <govuk-app-text>They stay on this phone. We do not share them with other government services.</govuk-app-text>\n  <govuk-app-text>You can delete them at any time.</govuk-app-text>\n  <govuk-app-button-stack slot=\"footer\">\n    <govuk-app-button name=\"manage\">Manage your saved details</govuk-app-button>\n  </govuk-app-button-stack>\n</govuk-app-screen>",
      "card": "patterns/information-page.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/patterns/information-page/"
    },
    {
      "name": "Outcome",
      "slug": "outcome",
      "purpose": "Tells the user that something has finished, such as signing in or out, with a short centred heading and line of text, and one action to go on.",
      "when": [
        "Something the user did has finished, and they need to know before they go on, such as after signing out or signing in.",
        "There is one obvious next step.",
        "The screen ends a journey, or a step in one, and the user can't go back into it."
      ],
      "avoid": [
        {
          "when": "The user hasn't done it yet, and is choosing whether to.",
          "instead": {
            "text": "Confirmation",
            "pattern": "confirmation"
          }
        },
        {
          "when": "The screen needs more than a line or two to explain things.",
          "instead": {
            "text": "Information page",
            "pattern": "information-page"
          }
        },
        {
          "when": "The user has more than one thing they could do next.",
          "instead": {
            "text": "Settings list, or a screen with a primary and a grouped secondary button in the button stack",
            "pattern": "settings-list"
          }
        }
      ],
      "components": [
        "govuk-app-screen",
        "govuk-app-heading",
        "govuk-app-text",
        "govuk-app-button-stack",
        "govuk-app-button"
      ],
      "screen": "You’ve signed out, shown after signing out from Settings",
      "notes": [
        "Say what happened in the heading, in the past tense, and what it means for the user in the text.",
        "It has no navigation bar: the user goes on with its button, not back.",
        "Its button goes nowhere of its own. The page listens for a click on it, by name, as examples/settings/signed-out.html does."
      ],
      "html": "<govuk-app-screen background=\"modal\">\n  <govuk-app-heading level=\"1\" align=\"center\">Your saved details have been deleted</govuk-app-heading>\n  <govuk-app-text align=\"center\">You can add them again at any time in Settings</govuk-app-text>\n  <govuk-app-button-stack slot=\"footer\">\n    <govuk-app-button name=\"continue\">Continue</govuk-app-button>\n  </govuk-app-button-stack>\n</govuk-app-screen>",
      "card": "patterns/outcome.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/patterns/outcome/"
    },
    {
      "name": "Settings list",
      "slug": "settings-list",
      "purpose": "A screen of settings and links, in grouped lists, for the user to scan and choose from. Each row opens a screen, opens a web page, shows a value or turns something on or off.",
      "when": [
        "The user needs to see and change several settings or preferences in one place.",
        "A section of the app needs a menu of the screens and pages under it, such as account, privacy and help.",
        "Rows fall into a few groups, each with an optional title above and line of explanation below.",
        "It is the root screen of a tab, such as Settings."
      ],
      "avoid": [
        {
          "when": "The screen asks the user to confirm one action, such as signing out or deleting something.",
          "instead": {
            "text": "Confirmation",
            "pattern": "confirmation"
          }
        },
        {
          "when": "The screen explains one thing in paragraphs, with at most one action.",
          "instead": {
            "text": "Information page",
            "pattern": "information-page"
          }
        },
        {
          "when": "The screen tells the user that something has finished.",
          "instead": {
            "text": "Outcome",
            "pattern": "outcome"
          }
        },
        {
          "when": "The user is filling in details, such as a name or registration number.",
          "instead": {
            "text": "A screen with the text field and a primary button in the button stack"
          }
        }
      ],
      "components": [
        "govuk-app-screen",
        "govuk-app-nav-bar",
        "govuk-app-grouped-list",
        "govuk-app-tab-bar"
      ],
      "screen": "Settings, the root of the Settings tab",
      "notes": [
        "Keep the tab bar only on a tab's root screen. A list pushed from another screen has a back button in its navigation bar instead, and no tab bar.",
        "Put a destructive row, such as Sign out, in a group of its own, last.",
        "Give each row that opens a screen an href to that page, in place of its name, in a prototype of several pages."
      ],
      "html": "<govuk-app-screen>\n  <govuk-app-nav-bar title=\"Settings\" large-title></govuk-app-nav-bar>\n\n  <govuk-app-grouped-list footer=\"A line under a group, to explain the rows in it.\">\n    <govuk-app-grouped-list-row type=\"information\" description=\"name@example.com\">Your account</govuk-app-grouped-list-row>\n    <govuk-app-grouped-list-row type=\"link\" href=\"https://www.gov.uk\">Manage your account</govuk-app-grouped-list-row>\n  </govuk-app-grouped-list>\n\n  <govuk-app-grouped-list>\n    <govuk-app-grouped-list-row type=\"detail\" detail=\"Off\" name=\"notifications\">Notifications</govuk-app-grouped-list-row>\n    <govuk-app-grouped-list-row name=\"face-id\">Face ID</govuk-app-grouped-list-row>\n    <govuk-app-grouped-list-row type=\"toggle\" name=\"statistics\" checked>Share app usage statistics</govuk-app-grouped-list-row>\n  </govuk-app-grouped-list>\n\n  <govuk-app-grouped-list title=\"Privacy and legal\">\n    <govuk-app-grouped-list-row type=\"link\" href=\"https://www.gov.uk\">Privacy notice</govuk-app-grouped-list-row>\n    <govuk-app-grouped-list-row type=\"link\" href=\"https://www.gov.uk\">Terms and conditions</govuk-app-grouped-list-row>\n    <govuk-app-grouped-list-row name=\"your-data\">Your app data</govuk-app-grouped-list-row>\n  </govuk-app-grouped-list>\n\n  <govuk-app-grouped-list>\n    <govuk-app-grouped-list-row type=\"detail\" destructive name=\"sign-out\">Sign out</govuk-app-grouped-list-row>\n  </govuk-app-grouped-list>\n\n  <govuk-app-tab-bar>\n    <govuk-app-tab-bar-item icon=\"home\" name=\"home\">Home</govuk-app-tab-bar-item>\n    <govuk-app-tab-bar-item icon=\"chat_bubble\" name=\"chat\">Chat</govuk-app-tab-bar-item>\n    <govuk-app-tab-bar-item icon=\"settings\" name=\"settings\" selected>Settings</govuk-app-tab-bar-item>\n  </govuk-app-tab-bar>\n</govuk-app-screen>",
      "card": "patterns/settings-list.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/patterns/settings-list/"
    }
  ],
  "templates": [
    {
      "name": "Chat",
      "slug": "chat",
      "purpose": "The app’s Chat tab, GOV.UK Chat, in its own words: a new chat with its welcome message and questions to try, a question being answered, and the answer, with the GOV.UK pages it used. Asking a question moves through all three.",
      "when": [
        "Prototyping a question and answer in GOV.UK Chat, such as how Chat should answer about a service.",
        "Prototyping a change to how Chat looks or behaves, such as a new kind of answer or something new under the field.",
        "Prototyping a journey that starts in Chat, or one that Chat hands on to another screen.",
        "Testing different questions to try, or a change to Chat’s wording."
      ],
      "avoid": [],
      "components": [
        "govuk-app-screen",
        "govuk-app-heading",
        "govuk-app-text",
        "govuk-app-bulleted-list",
        "govuk-app-link",
        "govuk-app-chat-answer",
        "govuk-app-chat-question",
        "govuk-app-chat-loading",
        "govuk-app-chat-example-questions",
        "govuk-app-chat-input",
        "govuk-app-menu-button",
        "govuk-app-tab-bar"
      ],
      "screen": "Chat, the root of the Chat tab: a new chat, a question being answered, and its answer",
      "notes": [
        "Copy the whole folder, so the screens keep linking to each other. Each page has a comment at its top saying what to change and what to leave.",
        "The pages are plain HTML, so they move on with links, the field’s form and a page that refreshes. Whatever is typed, the answer is the one in answer.html.",
        "To ask another question, change it in all three pages, and write its answer in answer.html. For a longer conversation, copy generating.html and answer.html for each question, and point each at the next.",
        "Only the first question to try goes somewhere. Privacy notice, About and Give feedback, in the field’s menu, go nowhere.",
        "The app asks the user to agree to GOV.UK Chat’s terms before their first chat. Those screens aren’t here.",
        "Home and Settings on the tab bar open the Home and Settings templates, if they’re beside this one."
      ],
      "screens": [
        {
          "file": "index.html",
          "title": "GOV.UK Chat",
          "description": "A new chat: the welcome message and three questions to try. The first question, or typing one and sending it, asks it.",
          "path": "src/templates/chat/index.html"
        },
        {
          "file": "generating.html",
          "title": "Generating your answer",
          "description": "The question, with the loading indicator under it. Moves on to the answer by itself after 3 seconds.",
          "path": "src/templates/chat/generating.html"
        },
        {
          "file": "answer.html",
          "title": "Answer",
          "description": "Chat’s answer, with headings, a bulleted list, links and the GOV.UK pages it used. Sending another question asks it; Clear chat, in the field’s menu, starts a new chat.",
          "path": "src/templates/chat/answer.html"
        }
      ],
      "card": "templates/chat.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/templates/chat/about/"
    },
    {
      "name": "Home",
      "slug": "home",
      "purpose": "The app’s Home tab, as a user sees it once they’ve chosen some topics, set their council and visited some pages: the header and search, then the Topics, Your local services and Pages you’ve visited widgets, and a way to give feedback.",
      "when": [
        "Prototyping a new widget on Home, or a change to one.",
        "Prototyping a journey that starts on Home, such as from a topic or a page the user has visited.",
        "Showing a new feature in the place a user would find it, in the app as it is."
      ],
      "avoid": [],
      "components": [
        "govuk-app-screen",
        "govuk-app-home-header",
        "govuk-app-search-field",
        "govuk-app-grouped-list",
        "govuk-app-segmented-control",
        "govuk-app-section-heading",
        "govuk-app-link-card",
        "govuk-app-text",
        "govuk-app-button",
        "govuk-app-crown",
        "govuk-app-tab-bar"
      ],
      "screen": "Home, the root of the Home tab, with its topics, local services and recent activity widgets",
      "notes": [
        "The page has a comment at its top saying what to change and what to leave.",
        "The topics, Edit, See all and Give feedback go nowhere, as the library has no screens for them. Give a row an href to a page of yours to make it open one.",
        "Searching isn’t here: the field takes typing, but there are no results.",
        "Chat and Settings on the tab bar open the Chat and Settings templates, if they’re beside this one."
      ],
      "screens": [
        {
          "file": "index.html",
          "title": "Home",
          "description": "The root of the Home tab. Your topics and All topics switch the topics shown; the local council and the pages visited open GOV.UK in the browser.",
          "path": "src/templates/home/index.html"
        }
      ],
      "card": "templates/home.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/templates/home/about/"
    },
    {
      "name": "Settings",
      "slug": "settings",
      "purpose": "The app’s Settings tab and every screen it opens in the app today: Face ID, Your app data, and signing out, through the confirmation, to You’ve signed out. Their pages link to each other as the app’s screens do.",
      "when": [
        "Prototyping a new setting, or a change to an existing one.",
        "Prototyping a new screen opened from Settings, such as a page about the user’s account or data.",
        "Prototyping a journey that starts in Settings, such as signing out or managing notifications.",
        "Testing a change to the wording of Settings or the screens it opens."
      ],
      "avoid": [],
      "components": [
        "govuk-app-screen",
        "govuk-app-nav-bar",
        "govuk-app-grouped-list",
        "govuk-app-tab-bar",
        "govuk-app-text",
        "govuk-app-bulleted-list",
        "govuk-app-heading",
        "govuk-app-button",
        "govuk-app-button-stack",
        "govuk-app-sheet"
      ],
      "screen": "Settings, the root of the Settings tab, and the screens it opens: Face ID, Your app data, the sign-out confirmation and You’ve signed out",
      "notes": [
        "Copy the whole folder, so the screens keep linking to each other. Delete the screens you don’t need, and the rows that open them.",
        "Each page has a comment at its top saying what to change and what to leave.",
        "Your accounts, Messages, Notifications and Open source licences go nowhere, as the library has no screens for them. Give a row an href to a page of yours to make it open one.",
        "Home and Chat on the tab bar open the Home and Chat templates, if they’re beside this one.",
        "Signing out and signing in again only move between pages: nothing is remembered."
      ],
      "screens": [
        {
          "file": "index.html",
          "title": "Settings",
          "description": "The root of the Settings tab, with the app’s own rows. Face ID, Your app data and Sign out open the other screens.",
          "path": "src/templates/settings/index.html"
        },
        {
          "file": "face-id.html",
          "title": "Face ID",
          "description": "Opened from the Face ID row. Explains Face ID, with a button to change it in the phone’s settings, and a back button to Settings.",
          "path": "src/templates/settings/face-id.html"
        },
        {
          "file": "your-app-data.html",
          "title": "Your app data",
          "description": "Opened from the Your app data row. Explains the data the app keeps, with a button to request it, and a back button to Settings.",
          "path": "src/templates/settings/your-app-data.html"
        },
        {
          "file": "sign-out.html",
          "title": "Are you sure you want to sign out?",
          "description": "Opened from the Sign out row, as a sheet over Settings. Sign out goes on to You’ve signed out; Cancel and close return to Settings.",
          "path": "src/templates/settings/sign-out.html"
        },
        {
          "file": "signed-out.html",
          "title": "You’ve signed out",
          "description": "After signing out. Signing in again returns to Settings.",
          "path": "src/templates/settings/signed-out.html"
        }
      ],
      "card": "templates/settings.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/templates/settings/about/"
    }
  ],
  "components": [
    {
      "name": "Address",
      "element": "govuk-app-address",
      "slug": "address",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Shows a person's name and postal address, such as who a vehicle is registered to, or who holds a driving licence.",
      "attributes": {
        "name": {
          "type": "string",
          "description": "The person's name, in bold above the address, such as Mrs Jane Bloggs. Leave it off for an address alone."
        }
      },
      "content": "The address's lines, each on a line of its own, or separated by <br>. Blank lines and indents are left out, so they can be written however reads best in the HTML.",
      "contains": {
        "text": true
      },
      "rules": [
        "Write the name and address as the service holds them: the app shows DVLA's records as they are, which may be in capitals.",
        "Put each part of the address on a line of its own, ending with the postcode.",
        "Give it a heading that says whose address it is and why, such as Registered to.",
        "Don't show an address the user hasn't proved is theirs, such as in a vehicle check for any vehicle."
      ],
      "avoid": [
        {
          "when": "For one fact about a place, such as a postcode on its own",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"information\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "information"
            }
          }
        },
        {
          "when": "To ask the user for their postcode",
          "instead": {
            "text": "govuk-app-text-field type=\"postcode\"",
            "element": "govuk-app-text-field",
            "attributes": {
              "type": "postcode"
            }
          }
        },
        {
          "when": "For a place the user can go to, such as their local council",
          "instead": {
            "text": "govuk-app-link-card",
            "element": "govuk-app-link-card"
          }
        }
      ],
      "examples": [
        {
          "name": "A name and address",
          "html": "<govuk-app-address name=\"Mrs Jane Bloggs\">\n  75 St John's Street\n  Gateshead\n  NE8 2ED\n</govuk-app-address>"
        },
        {
          "name": "An address alone",
          "html": "<govuk-app-address>\n  Central Bedfordshire Council<br>\n  Priory House<br>\n  Chicksands<br>\n  SG17 5TQ\n</govuk-app-address>"
        }
      ],
      "script": "src/components/address/address.js",
      "card": "components/address.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/address/"
    },
    {
      "name": "Banner",
      "element": "govuk-app-banner",
      "slug": "banner",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Tells the user something they should know now, on the screen it's about: an alert on Home, such as an emergency, or a warning, such as that driving without tax can invalidate their insurance. It can have a link to find out more, and can be closed.",
      "attributes": {
        "type": {
          "type": "enum",
          "values": [
            "information",
            "local-emergency",
            "national-emergency",
            "notable-death",
            "warning"
          ],
          "default": "information",
          "description": "information: white, or blue in dark mode, with a pale blue border. local-emergency: teal. national-emergency: red. notable-death: black. warning, proposed: yellow, with an icon and smaller type, as the future driving designs' Stay insured."
        },
        "title": {
          "type": "string",
          "description": "Its title, in bold, such as Emergency alerts. The app's banners can be without one."
        },
        "level": {
          "type": "enum",
          "values": [
            "2",
            "3",
            "4"
          ],
          "default": "2",
          "description": "The title's place in the screen's outline. Drawn as h2 to h4."
        },
        "dismissible": {
          "type": "boolean",
          "default": false,
          "description": "Shows a button to close it, which hides it. The app's national emergencies can't be closed."
        },
        "link": {
          "type": "string",
          "description": "Text for a link below, such as More information."
        },
        "href": {
          "type": "string",
          "description": "Where the link goes."
        },
        "name": {
          "type": "string",
          "description": "Tells the banner apart when it's closed: its close button's value."
        },
        "icon": {
          "type": "string",
          "description": "For a warning, the name of a Material Symbol on its left, such as warning."
        }
      },
      "content": "What it says, a sentence or two.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use a banner for something the user should know now, about the screen it's on. Don't use it for something they must act on to carry on: put that in the screen itself.",
        "Use the emergency types only for the app's emergency alerts, as on Home, and only one at a time.",
        "Keep what it says to a sentence or two, with a link to find out more.",
        "Let it be closed unless it's an emergency the user must see, as the app's national emergencies can't be.",
        "Use warning, which is proposed, for a warning about something on the screen, such as Stay insured on a vehicle with no tax."
      ],
      "avoid": [
        {
          "when": "For something the user must do before they can carry on",
          "instead": {
            "text": "Say it in the screen itself, in its heading and text, with a button to do it."
          }
        },
        {
          "when": "For how something with a deadline stands, such as a vehicle's tax",
          "instead": {
            "text": "govuk-app-status",
            "element": "govuk-app-status"
          }
        },
        {
          "when": "For one card that needs attention, such as an expired licence",
          "instead": {
            "text": "govuk-app-card-header",
            "element": "govuk-app-card-header"
          }
        },
        {
          "when": "To confirm something worked, such as signing out",
          "instead": {
            "text": "A screen of its own, with a centred govuk-app-heading size=\"large-title\".",
            "element": "govuk-app-heading",
            "attributes": {
              "size": "large-title"
            }
          }
        },
        {
          "when": "For a few points that are read together",
          "instead": {
            "text": "govuk-app-bulleted-list",
            "element": "govuk-app-bulleted-list"
          }
        }
      ],
      "examples": [
        {
          "name": "Information",
          "html": "<govuk-app-banner title=\"Emergency alerts\" dismissible name=\"emergency-alerts-test\" link=\"More information\" href=\"https://www.gov.uk/alerts\">\n  Test on Sunday 7 September, 3pm\n</govuk-app-banner>"
        },
        {
          "name": "National emergency, which can't be closed",
          "html": "<govuk-app-banner type=\"national-emergency\" title=\"National emergency\" link=\"More information\" href=\"https://www.gov.uk/alerts\">\n  This is a level 1 incident\n</govuk-app-banner>"
        }
      ],
      "script": "src/components/banner/banner.js",
      "card": "components/banner.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/banner/"
    },
    {
      "name": "Bulleted list",
      "element": "govuk-app-bulleted-list",
      "slug": "bulleted-list",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Lists a few short points, each after a bullet, usually finishing a sentence that comes before it, such as what the app stores about the user or what sharing statistics shares.",
      "attributes": {
        "spacing": {
          "type": "enum",
          "values": [
            "regular",
            "compact"
          ],
          "default": "regular",
          "description": "regular: the text 16pt after the bullet, and the points 8pt apart. compact: 8pt and 4pt, for a short list closely following its sentence, as on Your app data."
        }
      },
      "content": "Two or more <govuk-app-bulleted-list-item> elements, in order, each holding one point as text, which may include a link.",
      "contains": {
        "elements": [
          "govuk-app-bulleted-list-item"
        ]
      },
      "parts": {
        "govuk-app-bulleted-list-item": {
          "description": "One point in the list, as text, which may include a link or a few words in bold.",
          "attributes": {},
          "contains": {
            "text": true,
            "inline": [
              "govuk-app-strong",
              "govuk-app-link"
            ]
          }
        }
      },
      "rules": [
        "Introduce the list with a sentence ending in a colon, and write each point to finish it: in lower case, with no full stop, as the app does.",
        "Keep each point short, a line or two.",
        "Use it for points that are read together, not for steps in order or for things to tap: use a grouped list for those.",
        "Use one spacing throughout a journey's screens."
      ],
      "avoid": [
        {
          "when": "For things the user can tap, such as other screens",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"navigation\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "navigation"
            }
          }
        },
        {
          "when": "For two to four short facts, to take in at a glance",
          "instead": {
            "text": "govuk-app-summary-columns",
            "element": "govuk-app-summary-columns"
          }
        },
        {
          "when": "For a single point",
          "instead": {
            "text": "govuk-app-text",
            "element": "govuk-app-text"
          }
        },
        {
          "when": "For steps the user takes in order",
          "instead": {
            "text": "govuk-app-grouped-list",
            "element": "govuk-app-grouped-list"
          }
        }
      ],
      "examples": [
        {
          "name": "Regular, as on the screen asking to share statistics",
          "html": "<govuk-app-text>You can help us improve this app by agreeing to share statistics about:</govuk-app-text>\n<govuk-app-bulleted-list>\n  <govuk-app-bulleted-list-item>the pages you visit within the app</govuk-app-bulleted-list-item>\n  <govuk-app-bulleted-list-item>how long you spend on each page</govuk-app-bulleted-list-item>\n  <govuk-app-bulleted-list-item>what you tap on while you're on each page</govuk-app-bulleted-list-item>\n  <govuk-app-bulleted-list-item>errors that happen</govuk-app-bulleted-list-item>\n</govuk-app-bulleted-list>"
        },
        {
          "name": "Compact, as on Your app data",
          "html": "<govuk-app-text>We store a small amount of data about you to improve your experience in the app, like:</govuk-app-text>\n<govuk-app-bulleted-list spacing=\"compact\">\n  <govuk-app-bulleted-list-item>your notification settings</govuk-app-bulleted-list-item>\n  <govuk-app-bulleted-list-item>a unique ID for this app (Push ID)</govuk-app-bulleted-list-item>\n</govuk-app-bulleted-list>"
        }
      ],
      "script": "src/components/bulleted-list/bulleted-list.js",
      "card": "components/bulleted-list.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/bulleted-list/"
    },
    {
      "name": "Button",
      "element": "govuk-app-button",
      "slug": "button",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Lets the user take an action, such as continuing a journey, confirming a choice or removing something. It is the app's own button, in five variants: primary, secondary, grouped secondary, compact and destructive, and a sixth, black, for a green screen.",
      "attributes": {
        "variant": {
          "type": "enum",
          "values": [
            "primary",
            "secondary",
            "grouped-secondary",
            "compact",
            "destructive",
            "black"
          ],
          "default": "primary",
          "description": "Which kind of button. black: the main action on a green screen. Anything else draws a primary button."
        },
        "type": {
          "type": "enum",
          "values": [
            "button",
            "submit"
          ],
          "default": "button",
          "description": "submit: pressing it sends the form it's in, with what the user typed or chose, and its own name and value if it has them. button: it does nothing until a page listens for it."
        },
        "disabled": {
          "type": "boolean",
          "default": false,
          "description": "Greys the button out, and stops it being pressed or focused."
        },
        "name": {
          "type": "string",
          "description": "Set on the button, so a page listening for clicks can tell one button from another."
        },
        "value": {
          "type": "string",
          "description": "Set on the button, alongside name, to say which of several choices was pressed."
        }
      },
      "content": "The button's label, as text. Keep it to a few words.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use a primary button for the main action on a screen, and use at most one.",
        "Use a grouped secondary button for an alternative to the primary action, directly below it in the same group, as ButtonStackView does.",
        "Use a secondary button, with its outline, for an alternative action that stands on its own, away from a primary button.",
        "Use a compact button for a lighter action within the content of a screen, such as on a card, rather than to move the journey on.",
        "Use a destructive button only for an action that deletes or removes something, such as signing out or removing an account, and usually on a screen that asks the user to confirm it.",
        "Use a black button in place of a primary button on a green screen, as the app does, and not elsewhere.",
        "Write the label as a verb that says what will happen: 'Continue', 'Confirm postcode', 'Remove account'. Do not use 'Click here' or 'Submit'.",
        "Make the button that sends a form's answers a submit button, inside the form, so pressing Return in a field sends them too.",
        "A button fills the width of what it sits in. Put it in a container to make it narrower.",
        "Disable a button only while the screen is waiting for something the user has to give first, such as a postcode, and make it clear what that is."
      ],
      "avoid": [
        {
          "when": "For an action on the whole screen, such as Close, Done or Edit",
          "instead": {
            "text": "govuk-app-nav-bar-item",
            "element": "govuk-app-nav-bar-item"
          }
        },
        {
          "when": "For a screen's main action and a way out of it, at the bottom of the screen",
          "instead": {
            "text": "govuk-app-button-stack",
            "element": "govuk-app-button-stack"
          }
        },
        {
          "when": "For a row that goes to another screen, as on Settings",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"navigation\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "navigation"
            }
          }
        },
        {
          "when": "For a link to a web page",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"link\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "link"
            }
          }
        },
        {
          "when": "For an action that adds to a list, such as Add vehicle",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"action\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "action"
            }
          }
        },
        {
          "when": "For a few less-used actions on a card, such as Change address",
          "instead": {
            "text": "govuk-app-menu-button",
            "element": "govuk-app-menu-button"
          }
        },
        {
          "when": "To switch something on or off straight away",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"toggle\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "toggle"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "Primary",
          "html": "<govuk-app-button name=\"continue\">Continue</govuk-app-button>"
        },
        {
          "name": "Primary, disabled until there is something to confirm",
          "html": "<govuk-app-button disabled>Confirm postcode</govuk-app-button>"
        }
      ],
      "script": "src/components/button/button.js",
      "card": "components/button.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/button/"
    },
    {
      "name": "Button stack",
      "element": "govuk-app-button-stack",
      "slug": "button-stack",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Holds a screen's main action, and any way out of it, at the bottom of the screen under a divider, where they stay as the content scrolls. Used on screens that ask the user to do something, such as confirm, agree or continue.",
      "attributes": {},
      "content": "One or two <govuk-app-button> elements, top to bottom: the main action, as a primary or destructive button, then any way out of it as a grouped secondary button. Give the stack slot=\"footer\" to pin it to the bottom of a <govuk-app-screen>.",
      "contains": {
        "elements": [
          "govuk-app-button"
        ]
      },
      "rules": [
        "Put it in a <govuk-app-screen> with slot=\"footer\", so it stays at the bottom as the content scrolls.",
        "Put the main action first, as a primary button, or a destructive one if it deletes or removes something. Put any way out of it second, as a grouped secondary button, such as Cancel or Not now.",
        "Use no more than two buttons.",
        "Don't use it on a screen with a tab bar: the app hides the tab bar on screens that ask the user to act."
      ],
      "avoid": [
        {
          "when": "For a lighter action within the content, such as on a card",
          "instead": {
            "text": "govuk-app-button variant=\"compact\"",
            "element": "govuk-app-button",
            "attributes": {
              "variant": "compact"
            }
          }
        },
        {
          "when": "For an action on the whole screen that doesn't move the journey on, such as Edit",
          "instead": {
            "text": "govuk-app-nav-bar-item",
            "element": "govuk-app-nav-bar-item"
          }
        },
        {
          "when": "On a top-level screen, with a tab bar",
          "instead": {
            "text": "Put the action on a screen of its own, pushed on top, without the tab bar, and put the button stack there."
          }
        },
        {
          "when": "For more than two choices",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"navigation\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "navigation"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "An action and a way out",
          "html": "<govuk-app-button-stack>\n  <govuk-app-button name=\"allow\">Allow notifications</govuk-app-button>\n  <govuk-app-button variant=\"grouped-secondary\" name=\"not-now\">Not now</govuk-app-button>\n</govuk-app-button-stack>"
        },
        {
          "name": "One button",
          "html": "<govuk-app-button-stack>\n  <govuk-app-button name=\"continue\">Continue</govuk-app-button>\n</govuk-app-button-stack>"
        }
      ],
      "script": "src/components/button-stack/button-stack.js",
      "card": "components/button-stack.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/button-stack/"
    },
    {
      "name": "Chat answer",
      "element": "govuk-app-chat-answer",
      "slug": "chat-answer",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Shows GOV.UK Chat's answer to a question, on a white card the width of the conversation, with the GOV.UK pages it used and a warning to check them. Also GOV.UK Chat's welcome message, at the start of a new chat.",
      "attributes": {
        "note": {
          "type": "string",
          "description": "A note below the message, in small grey text, 24pt below it, as the welcome message says Messages will be saved for 90 days."
        },
        "sources-open": {
          "type": "boolean",
          "default": false,
          "description": "Draws the list of GOV.UK pages open. The app starts it closed, and the user opens it."
        }
      },
      "content": "The answer, written with <govuk-app-text>, <govuk-app-heading level=\"3\" size=\"body\"> and <govuk-app-bulleted-list spacing=\"compact\">, with <govuk-app-link> for links in them. Then a <govuk-app-chat-source href=\"…\"> for each GOV.UK page it used, holding the page's title. With sources, it draws the warning and the list of pages.",
      "contains": {
        "elements": [
          "govuk-app-text",
          "govuk-app-heading",
          "govuk-app-bulleted-list",
          "govuk-app-chat-source"
        ]
      },
      "parts": {
        "govuk-app-chat-source": {
          "description": "One GOV.UK page the answer used, holding the page's title, listed under the answer.",
          "attributes": {
            "href": {
              "type": "string",
              "required": true,
              "description": "The page's address on GOV.UK."
            }
          },
          "contains": {
            "text": true
          }
        }
      },
      "rules": [
        "Follow each question with its answer.",
        "Give an answer the GOV.UK pages it used, as the app's answers have, so the warning to check them is shown. Leave them off only to show an answer the app couldn't find pages for.",
        "Write the answer as GOV.UK Chat would: short paragraphs, headings in Body, semibold, and lists, with links to GOV.UK pages.",
        "Start a new chat with the welcome message: Hi, I’m GOV.UK Chat 👋. I use AI to help you find what you need on GOV.UK., with the note Messages will be saved for 90 days. Leave its sources off."
      ],
      "avoid": [
        {
          "when": "For the user's own question",
          "instead": {
            "text": "govuk-app-chat-question",
            "element": "govuk-app-chat-question"
          }
        },
        {
          "when": "While the answer is being generated",
          "instead": {
            "text": "govuk-app-chat-loading stage=\"generating\"",
            "element": "govuk-app-chat-loading",
            "attributes": {
              "stage": "generating"
            }
          }
        },
        {
          "when": "For text on a screen that isn't GOV.UK Chat",
          "instead": {
            "text": "govuk-app-text",
            "element": "govuk-app-text"
          }
        }
      ],
      "examples": [
        {
          "name": "With the pages it used",
          "html": "<govuk-app-chat-answer sources-open>\n  <govuk-app-text>You can renew your passport online. It costs £94.50 and usually takes up to 3 weeks.</govuk-app-text>\n  <govuk-app-text>You’ll need a <govuk-app-link href=\"https://www.gov.uk/photos-for-passports\">digital photo</govuk-app-link> and a credit or debit card.</govuk-app-text>\n  <govuk-app-chat-source href=\"https://www.gov.uk/renew-adult-passport\">Renew or replace your adult passport</govuk-app-chat-source>\n  <govuk-app-chat-source href=\"https://www.gov.uk/passport-fees\">Passport fees</govuk-app-chat-source>\n</govuk-app-chat-answer>"
        },
        {
          "name": "Without sources",
          "html": "<govuk-app-chat-answer>\n  <govuk-app-text>Sorry, I cannot answer that. Try asking about something on GOV.UK.</govuk-app-text>\n</govuk-app-chat-answer>"
        }
      ],
      "script": "src/components/chat-answer/chat-answer.js",
      "card": "components/chat-answer.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/chat-answer/"
    },
    {
      "name": "Chat example questions",
      "element": "govuk-app-chat-example-questions",
      "slug": "chat-example-questions",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Suggests questions to ask GOV.UK Chat, at the start of a new chat, under the welcome message. Pressing one asks it.",
      "attributes": {},
      "content": "A <govuk-app-chat-example-question> for each question, holding its text. Give one an href to go to a page, such as the answer, or a name and value to be a button.",
      "contains": {
        "elements": [
          "govuk-app-chat-example-question"
        ]
      },
      "parts": {
        "govuk-app-chat-example-question": {
          "description": "One example question, holding its text: a link to a page, such as the answer, or a button.",
          "attributes": {
            "href": {
              "type": "string",
              "description": "Makes it a link to this page."
            },
            "name": {
              "type": "string",
              "description": "Without an href, makes it a button with this name, so a page listening for clicks can tell which was pressed."
            },
            "value": {
              "type": "string",
              "description": "Set on the button, alongside name, to say which of several it was."
            }
          },
          "contains": {
            "text": true
          }
        }
      },
      "rules": [
        "Show them only in a new chat, after the welcome message, as the app does. Leave them out once the user has asked a question.",
        "Suggest two or three questions, as the app does.",
        "Write each as a user would ask it, about something GOV.UK Chat can answer."
      ],
      "avoid": [
        {
          "when": "For things to do with the chat, such as clearing it",
          "instead": {
            "text": "govuk-app-menu-button-item",
            "element": "govuk-app-menu-button-item"
          }
        },
        {
          "when": "For a question the user has asked",
          "instead": {
            "text": "govuk-app-chat-question",
            "element": "govuk-app-chat-question"
          }
        },
        {
          "when": "For suggestions outside GOV.UK Chat, such as other screens to go to",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"navigation\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "navigation"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "Three questions",
          "html": "<govuk-app-chat-example-questions>\n  <govuk-app-chat-example-question href=\"#\">How do I renew my passport?</govuk-app-chat-example-question>\n  <govuk-app-chat-example-question href=\"#\">What benefits can I get if I’m caring for someone?</govuk-app-chat-example-question>\n  <govuk-app-chat-example-question href=\"#\">When is my council tax due?</govuk-app-chat-example-question>\n</govuk-app-chat-example-questions>"
        }
      ],
      "script": "src/components/chat-example-questions/chat-example-questions.js",
      "card": "components/chat-example-questions.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/chat-example-questions/"
    },
    {
      "name": "Chat input",
      "element": "govuk-app-chat-input",
      "slug": "chat-input",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Where the user asks GOV.UK Chat a question, pinned below the conversation: a field that grows as they type, a send button once there's a question, and a menu of things to do with the chat, such as clearing it.",
      "attributes": {
        "action": {
          "type": "string",
          "description": "Where the form goes when the question is sent, such as the page with its answer. Without one, it goes to the page it's on."
        },
        "method": {
          "type": "enum",
          "values": [
            "get",
            "post"
          ],
          "default": "get",
          "description": "How the form is sent. get puts the question in the address of the page it goes to."
        },
        "name": {
          "type": "string",
          "default": "question",
          "description": "The field's name, which the question is sent as."
        },
        "value": {
          "type": "string",
          "description": "A question already typed, to show the field as the user is typing."
        },
        "placeholder": {
          "type": "string",
          "default": "Ask a question...",
          "description": "Shown in the field while it's empty."
        },
        "label": {
          "type": "string",
          "description": "The field's name for screen readers. Without one, it's the placeholder."
        }
      },
      "content": "The menu's items, <govuk-app-menu-button-item> elements, top to bottom, as the app has them: Clear chat, destructive, with the delete icon, then Privacy notice, About and Give feedback. Without any, there's no menu.",
      "contains": {
        "elements": [
          "govuk-app-menu-button-item"
        ]
      },
      "rules": [
        "Put it in the screen's footer, with slot=\"footer\", so it's pinned below the conversation, and above the tab bar, if the screen has one.",
        "Use one on every GOV.UK Chat screen, including a new chat and while an answer is being generated, as the app does.",
        "Give it the app's menu: Clear chat, once there's a conversation to clear, then Privacy notice, About and Give feedback.",
        "Give it an action to take the user to the next page of a prototype when they send a question, such as its answer."
      ],
      "avoid": [
        {
          "when": "To ask the user a question on a form, such as their postcode",
          "instead": {
            "text": "govuk-app-text-field",
            "element": "govuk-app-text-field"
          }
        },
        {
          "when": "To search GOV.UK",
          "instead": {
            "text": "govuk-app-search-field",
            "element": "govuk-app-search-field"
          }
        },
        {
          "when": "To search for something on a card of its own, such as a vehicle",
          "instead": {
            "text": "govuk-app-search-box",
            "element": "govuk-app-search-box"
          }
        }
      ],
      "examples": [
        {
          "name": "Empty, with its menu",
          "html": "<govuk-app-chat-input>\n  <govuk-app-menu-button-item name=\"clear-chat\" destructive icon=\"delete\">Clear chat</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"privacy\">Privacy notice</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"about\">About</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"feedback\">Give feedback</govuk-app-menu-button-item>\n</govuk-app-chat-input>"
        },
        {
          "name": "With a question",
          "html": "<govuk-app-chat-input value=\"How do I renew my passport?\">\n  <govuk-app-menu-button-item name=\"clear-chat\" destructive icon=\"delete\">Clear chat</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"privacy\">Privacy notice</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"about\">About</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"feedback\">Give feedback</govuk-app-menu-button-item>\n</govuk-app-chat-input>"
        }
      ],
      "script": "src/components/chat-input/chat-input.js",
      "card": "components/chat-input.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/chat-input/"
    },
    {
      "name": "Chat loading",
      "element": "govuk-app-chat-loading",
      "slug": "chat-loading",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Shows that GOV.UK Chat is busy: Sending... while the user's question is sent, then Generating your answer…, with the app's animation, until the answer comes.",
      "attributes": {
        "stage": {
          "type": "enum",
          "values": [
            "sending",
            "generating"
          ],
          "default": "generating",
          "description": "sending: Sending..., at the right, while the question is sent. generating: Generating your answer…, after the animation, while the answer is being written."
        }
      },
      "content": null,
      "contains": {},
      "rules": [
        "Use sending in place of the question the user has just asked, and generating below it, as the app shows both while a question is sent.",
        "Once the question is sent, show it with a chat question, and keep generating below it until the answer comes.",
        "Replace it with the answer. Never leave it in a conversation that has its answer."
      ],
      "avoid": [
        {
          "when": "Once the answer has come",
          "instead": {
            "text": "govuk-app-chat-answer",
            "element": "govuk-app-chat-answer"
          }
        },
        {
          "when": "For waiting on a screen that isn't GOV.UK Chat",
          "instead": {
            "text": "Go straight to what comes next: the library has no other loading indicator."
          }
        }
      ],
      "examples": [
        {
          "name": "Generating an answer",
          "html": "<govuk-app-chat-loading></govuk-app-chat-loading>"
        },
        {
          "name": "Sending a question",
          "html": "<govuk-app-chat-loading stage=\"sending\"></govuk-app-chat-loading>"
        }
      ],
      "script": "src/components/chat-loading/chat-loading.js",
      "card": "components/chat-loading.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/chat-loading/"
    },
    {
      "name": "Chat question",
      "element": "govuk-app-chat-question",
      "slug": "chat-question",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Shows a question the user asked GOV.UK Chat, in a dark blue bubble at the right of the conversation.",
      "attributes": {},
      "content": "The question, as text, as the user typed it.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use it in a screen of GOV.UK Chat, after the answer before it, or after the welcome message for the first question.",
        "Follow it with the answer, or with a chat loading while the answer is being generated.",
        "Write the question as a user would type it: in their words, not GOV.UK's."
      ],
      "avoid": [
        {
          "when": "For GOV.UK Chat's answer, or its welcome message",
          "instead": {
            "text": "govuk-app-chat-answer",
            "element": "govuk-app-chat-answer"
          }
        },
        {
          "when": "For a question the user hasn't asked yet, suggested to them",
          "instead": {
            "text": "govuk-app-chat-example-questions",
            "element": "govuk-app-chat-example-questions"
          }
        }
      ],
      "examples": [
        {
          "name": "A short question",
          "html": "<govuk-app-chat-question>How do I renew my passport?</govuk-app-chat-question>"
        },
        {
          "name": "A longer question",
          "html": "<govuk-app-chat-question>I’m moving to Spain next year. Do I need to exchange my driving licence, and how long do I have to do it?</govuk-app-chat-question>"
        }
      ],
      "script": "src/components/chat-question/chat-question.js",
      "card": "components/chat-question.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/chat-question/"
    },
    {
      "name": "Crown",
      "element": "govuk-app-crown",
      "slug": "crown",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Ends the home screen: the crown, which grows and fades in as the user scrolls to the end, so they can tell there is nothing more below it.",
      "attributes": {},
      "content": "None.",
      "contains": {},
      "rules": [
        "Use it only on the home screen, as the app does.",
        "Put it last in the <govuk-app-screen>, after the last widget and before the tab bar. It grows over the last 70pt of the screen's scroll, so anything after it would leave it part grown.",
        "It is decorative, so assistive technology skips it. Don't give it a label."
      ],
      "avoid": [
        {
          "when": "On any screen but Home",
          "instead": {
            "text": "Leave it out: other screens end with their last section."
          }
        },
        {
          "when": "For the GOV.UK wordmark at the top of Home",
          "instead": {
            "text": "govuk-app-home-header",
            "element": "govuk-app-home-header"
          }
        }
      ],
      "examples": [
        {
          "name": "At the end of the home screen",
          "html": "<govuk-app-screen>\n  <govuk-app-text align=\"center\">Tell us what you think about the app</govuk-app-text>\n  <govuk-app-button variant=\"grouped-secondary\">Give feedback</govuk-app-button>\n  <govuk-app-crown></govuk-app-crown>\n</govuk-app-screen>"
        }
      ],
      "script": "src/components/crown/crown.js",
      "card": "components/crown.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/crown/"
    },
    {
      "name": "Grouped list",
      "element": "govuk-app-grouped-list",
      "slug": "grouped-list",
      "kind": "govuk",
      "inApp": true,
      "purpose": "A section of rows on a rounded card, as on the Settings screen: rows that go to another screen, open a web page, switch something on or off, or show a value. Each section can have a title above it and a footer below.",
      "attributes": {
        "title": {
          "type": "string",
          "description": "The section's title, above the card. Without it, the card stands alone, as on Settings."
        },
        "level": {
          "type": "enum",
          "values": [
            "1",
            "2",
            "3",
            "4",
            "5",
            "6"
          ],
          "default": "2",
          "description": "The title's place in the screen's outline. Drawn as h1 to h6, always in Title 3."
        },
        "action": {
          "type": "string",
          "description": "Text for an action beside the title, such as See all."
        },
        "href": {
          "type": "string",
          "description": "Makes the title's action a link to this page."
        },
        "name": {
          "type": "string",
          "description": "The title's action's button's name."
        },
        "value": {
          "type": "string",
          "description": "The title's action's button's value."
        },
        "footer": {
          "type": "string",
          "description": "A note below the card, in Footnote, such as what a setting does."
        },
        "dividers": {
          "type": "enum",
          "values": [
            "full"
          ],
          "description": "Proposed, from the future driving designs: full draws the dividers between rows right across the card, in a paler blue, for a card whose rows are parts of one thing, such as a vehicle, rather than a list. Without it, they're GovKit's, 16pt in from each side."
        },
        "background": {
          "type": "enum",
          "values": [
            "subtle",
            "accent"
          ],
          "description": "Draws the card in another colour, as GovKit lets the app: subtle, pale blue, for a card on a white screen; accent, a stronger blue, proposed by the future driving designs for Add vehicle. Without it, the card is white, or dark blue in dark mode."
        }
      },
      "content": "The section's rows, <govuk-app-grouped-list-row> elements, in order. Each takes a type: navigation (the default: a chevron, to another screen), link (in the link colour, with an arrow out, to a web page), information (a value on the right, in grey, that can't be pressed), detail (a value on the right in the link colour, such as Off, to change it; destructive draws its title red), toggle (a switch, drawn by <govuk-app-toggle>; checked if it is on), count (a number on the right, with unread for a red dot) selectable (an icon on the right, if it names one, such as check) or topic (a navigation row with its icon on the left, in a circle, and its title in bold; icon names the symbol, such as currency_pound, or it draws a star). detail gives the value on the right; description, for information and link rows, a line of grey text below the title. Give href to make a row a link, or name and value to tell it apart as a button or switch. Its title is what is written between its tags. A link row with no-arrow has no arrow, as GovKit can draw one for a link that stays in the app. An action row is a single action, as the app's Add vehicle: its title, with an outlined plus on the right in the icon colour, or the icon it names. Anything given slot=\"control\", such as a segmented control, goes at the top of the card, above the rows, as the app's Topics widget has Your topics and All topics. An information or link row given an image, the URL of a picture, draws it on the left at its own size, as the app draws One Login's account icon on Settings (images/one-login.svg, in this component's folder). Proposed, from the future driving designs: content (anything written between its tags, such as a heading and text, 16pt in from the card's edges; with flush, none, for content with its own padding, such as summary columns).",
      "contains": {
        "elements": [
          "govuk-app-grouped-list-row"
        ],
        "slots": {
          "control": [
            "govuk-app-segmented-control"
          ]
        }
      },
      "parts": {
        "govuk-app-grouped-list-row": {
          "description": "One row of the list. Its title is what's written between its tags; its type decides what it draws on the right, and whether it can be pressed.",
          "attributes": {
            "type": {
              "type": "enum",
              "values": [
                "navigation",
                "link",
                "information",
                "detail",
                "toggle",
                "count",
                "selectable",
                "topic",
                "action",
                "content"
              ],
              "default": "navigation",
              "description": "navigation: a chevron, to another screen. link: in the link colour, with an arrow out, to a web page. information: a value on the right, in grey, that can't be pressed. detail: a value on the right in the link colour, such as Off, to change it. toggle: a switch. count: a number on the right. selectable: an icon on the right, if it names one. topic: a navigation row with its icon on the left, in a circle, and its title in bold. action: a single action, with an outlined plus on the right, or the icon it names. content (proposed): anything written between its tags."
            },
            "detail": {
              "type": "string",
              "description": "The value on the right of an information, detail or count row, such as Off or 2."
            },
            "description": {
              "type": "string",
              "description": "A line of grey text below the title of an information or link row."
            },
            "icon": {
              "type": "string",
              "description": "A Material Symbol: on the right of a selectable or action row, such as check, or a topic's on its left, such as currency_pound."
            },
            "image": {
              "type": "string",
              "description": "The address of a picture on the left of an information or link row, at its own size."
            },
            "href": {
              "type": "string",
              "description": "Makes the row a link to this page."
            },
            "name": {
              "type": "string",
              "description": "The name of the row's button or switch, so a page can tell which was pressed or switched."
            },
            "value": {
              "type": "string",
              "description": "Its button's or switch's value, alongside name."
            },
            "checked": {
              "type": "boolean",
              "default": false,
              "description": "A toggle row's switch is on."
            },
            "unread": {
              "type": "boolean",
              "default": false,
              "description": "A count row has a red dot, for something unread."
            },
            "destructive": {
              "type": "boolean",
              "default": false,
              "description": "A detail row's title is red, for something that removes or deletes."
            },
            "no-arrow": {
              "type": "boolean",
              "default": false,
              "description": "A link row has no arrow, for a link that stays in the app."
            },
            "flush": {
              "type": "boolean",
              "default": false,
              "description": "A content row has no padding, for content with its own, such as summary columns."
            }
          },
          "contains": {
            "text": true,
            "elements": "any"
          }
        }
      },
      "rules": [
        "Group rows that belong together in one section, and give each section a title unless the screen makes it obvious, as Settings does.",
        "Use navigation for a row that goes to another screen in the app, and link only for one that opens a web page.",
        "Use toggle for a setting that takes effect straight away. Use detail for one that is changed on another screen, showing its value, such as Off.",
        "Use information for a value the user can't change, such as the app's version.",
        "Keep row titles to one line where you can, and put any explanation in the section's footer, not the row.",
        "Use destructive only for a detail row that deletes or removes something, such as Sign out.",
        "Use topic only for a list of the app's topics, as on Home, with the topic's own icon.",
        "Use a content row for what a row type can't draw, such as a vehicle's name and its tax and MOT, and put anything more about it, such as Details, in a navigation row below. It's proposed, so isn't in the app yet.",
        "Use the subtle background for cards on a white screen, so they stand apart from it. The accent background is proposed, for a card that's a single action, such as Add vehicle.",
        "Use an action row on a card of its own, for an action that adds to the list above it, as Add vehicle does."
      ],
      "avoid": [
        {
          "when": "For a few points that are read together, and can't be tapped",
          "instead": {
            "text": "govuk-app-bulleted-list",
            "element": "govuk-app-bulleted-list"
          }
        },
        {
          "when": "For one destination that should stand out, such as the user's council",
          "instead": {
            "text": "govuk-app-link-card",
            "element": "govuk-app-link-card"
          }
        },
        {
          "when": "For the action that moves the journey on",
          "instead": {
            "text": "govuk-app-button variant=\"primary\"",
            "element": "govuk-app-button",
            "attributes": {
              "variant": "primary"
            }
          }
        },
        {
          "when": "To switch between views of the same thing, such as Vehicles and Licence",
          "instead": {
            "text": "govuk-app-segmented-control",
            "element": "govuk-app-segmented-control"
          }
        },
        {
          "when": "For two to four short facts of the same kind, side by side",
          "instead": {
            "text": "govuk-app-summary-columns",
            "element": "govuk-app-summary-columns"
          }
        }
      ],
      "examples": [
        {
          "name": "Every kind of row",
          "html": "<govuk-app-grouped-list title=\"Section 1 header\" footer=\"Footer\">\n  <govuk-app-grouped-list-row name=\"row-1\">Row title 1</govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"link\" href=\"https://www.gov.uk\">Row title 2</govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"information\" detail=\"Detail\" description=\"Body text\">Row title 3</govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"toggle\" name=\"row-4\" checked>Row title 4</govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"detail\" detail=\"Body text\" name=\"row-5\">Row title 5</govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"count\" detail=\"1\" unread name=\"row-6\">Row title 6</govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"selectable\" icon=\"check\" name=\"row-7\">Row title 7</govuk-app-grouped-list-row>\n</govuk-app-grouped-list>"
        },
        {
          "name": "An action row, as Add vehicle",
          "html": "<govuk-app-grouped-list>\n  <govuk-app-grouped-list-row type=\"action\" name=\"add-vehicle\">Add vehicle</govuk-app-grouped-list-row>\n</govuk-app-grouped-list>"
        }
      ],
      "script": "src/components/grouped-list/grouped-list.js",
      "card": "components/grouped-list.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/grouped-list/"
    },
    {
      "name": "Home header",
      "element": "govuk-app-home-header",
      "slug": "home-header",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Tops the home screen: the GOV.UK wordmark on blue, and the search field the user starts a search of GOV.UK from. It takes the place of the navigation bar, which the home screen hides.",
      "attributes": {},
      "content": "Optionally, a <govuk-app-search-field>, drawn below the wordmark, as on the app's home screen. Without one, the header is the wordmark alone, as when the app's search is turned off.",
      "contains": {
        "elements": [
          "govuk-app-search-field"
        ]
      },
      "rules": [
        "Use it only on the home screen, in place of a navigation bar. Other screens have a navigation bar.",
        "Put it first in a <govuk-app-screen>. It sticks to the top of the screen, and the content scrolls under it.",
        "Give it a search field, as the app does, unless the prototype is of the app without search.",
        "The wordmark is the screen's heading, so don't give the home screen another level 1 heading."
      ],
      "avoid": [
        {
          "when": "On any screen but Home",
          "instead": {
            "text": "govuk-app-nav-bar",
            "element": "govuk-app-nav-bar"
          }
        },
        {
          "when": "To search on a screen other than Home",
          "instead": {
            "text": "govuk-app-search-field",
            "element": "govuk-app-search-field"
          }
        }
      ],
      "examples": [
        {
          "name": "With search",
          "html": "<govuk-app-screen>\n  <govuk-app-home-header>\n    <govuk-app-search-field></govuk-app-search-field>\n  </govuk-app-home-header>\n  <govuk-app-section-heading action=\"Edit\">Topics</govuk-app-section-heading>\n  <p>Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.</p>\n  <govuk-app-tab-bar>\n    <govuk-app-tab-bar-item icon=\"home\" name=\"home\" selected>Home</govuk-app-tab-bar-item>\n    <govuk-app-tab-bar-item icon=\"settings\" name=\"settings\">Settings</govuk-app-tab-bar-item>\n  </govuk-app-tab-bar>\n</govuk-app-screen>"
        },
        {
          "name": "Without search",
          "html": "<govuk-app-screen>\n  <govuk-app-home-header></govuk-app-home-header>\n  <govuk-app-section-heading action=\"Edit\">Topics</govuk-app-section-heading>\n  <p>Driving and transport. Money and tax. Benefits. Care. Health and disability. Parenting and guardianship. Employment.</p>\n  <govuk-app-tab-bar>\n    <govuk-app-tab-bar-item icon=\"home\" name=\"home\" selected>Home</govuk-app-tab-bar-item>\n    <govuk-app-tab-bar-item icon=\"settings\" name=\"settings\">Settings</govuk-app-tab-bar-item>\n  </govuk-app-tab-bar>\n</govuk-app-screen>"
        }
      ],
      "script": "src/components/home-header/home-header.js",
      "card": "components/home-header.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/home-header/"
    },
    {
      "name": "Labelled icon",
      "element": "govuk-app-labelled-icon",
      "slug": "labelled-icon",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Shows a short fact with an icon that says what kind of fact it is, such as a vehicle's year with a calendar, its fuel with a pump, or its colour with a palette.",
      "attributes": {
        "icon": {
          "type": "string",
          "required": true,
          "description": "The name of a Material Symbol, such as calendar_month, local_gas_station or palette."
        },
        "layout": {
          "type": "enum",
          "values": [
            "stacked",
            "inline"
          ],
          "default": "stacked",
          "description": "stacked: the icon over its label, both centred, as the app shows them side by side. inline: the icon before its label, as the app shows them when they don't fit side by side."
        },
        "label": {
          "type": "string",
          "description": "What screen readers hear in place of the label alone, when the label doesn't say what it's about, such as Year of manufacture: 2021."
        }
      },
      "content": "The fact, a word or two, such as 2021, Petrol or Yellow.",
      "contains": {
        "text": true
      },
      "rules": [
        "Keep the label to a word or two: stacked, it stays on one line.",
        "Pick an icon that says what kind of fact it is, not what it is: a calendar for a year, whatever the year.",
        "Give it a label for screen readers when the fact alone doesn't say what it's about, as 2021 doesn't.",
        "Put a few side by side in summary columns, as the app does a vehicle's year, fuel and colour."
      ],
      "avoid": [
        {
          "when": "For something with a deadline or a validity, such as a vehicle's tax",
          "instead": {
            "text": "govuk-app-status",
            "element": "govuk-app-status"
          }
        },
        {
          "when": "For a number that matters on its own, such as penalty points",
          "instead": {
            "text": "govuk-app-count",
            "element": "govuk-app-count"
          }
        },
        {
          "when": "For a fact that needs more than a word or two",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"information\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "information"
            }
          }
        },
        {
          "when": "For a vehicle's registration",
          "instead": {
            "text": "govuk-app-number-plate size=\"small\"",
            "element": "govuk-app-number-plate",
            "attributes": {
              "size": "small"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "Stacked",
          "html": "<govuk-app-labelled-icon icon=\"calendar_month\" label=\"Year of manufacture: 2021\">2021</govuk-app-labelled-icon>"
        },
        {
          "name": "Inline",
          "html": "<govuk-app-labelled-icon icon=\"local_gas_station\" layout=\"inline\" label=\"Fuel: Petrol\">Petrol</govuk-app-labelled-icon>"
        }
      ],
      "script": "src/components/labelled-icon/labelled-icon.js",
      "card": "components/labelled-icon.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/labelled-icon/"
    },
    {
      "name": "Link",
      "element": "govuk-app-link",
      "slug": "link",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Makes a few words of a line a link, such as a GOV.UK page named in one of GOV.UK Chat's answers.",
      "attributes": {
        "href": {
          "type": "string",
          "required": true,
          "description": "Where it goes, such as a GOV.UK page."
        }
      },
      "content": "The words that are the link. Put it inside a <govuk-app-text> or a <govuk-app-bulleted-list-item>, around the words, and it takes that text's size.",
      "contains": {
        "text": true
      },
      "rules": [
        "Make the link's words say where it goes, such as the page's title, not click here.",
        "Use it inside a line of text. For a link on a row of its own, use a grouped list's link row, or a link card for one that should stand out."
      ],
      "avoid": [
        {
          "when": "For a link on a row of its own",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"link\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "link"
            }
          }
        },
        {
          "when": "For one destination that should stand out, such as the user's council",
          "instead": {
            "text": "govuk-app-link-card",
            "element": "govuk-app-link-card"
          }
        },
        {
          "when": "For an action, such as continuing a journey",
          "instead": {
            "text": "govuk-app-button",
            "element": "govuk-app-button"
          }
        }
      ],
      "examples": [
        {
          "name": "In a sentence",
          "html": "<govuk-app-text>You can <govuk-app-link href=\"https://www.gov.uk/apply-renew-passport\">apply for or renew your passport online</govuk-app-link>.</govuk-app-text>"
        },
        {
          "name": "In a list",
          "html": "<govuk-app-bulleted-list spacing=\"compact\">\n  <govuk-app-bulleted-list-item>you need a <govuk-app-link href=\"https://www.gov.uk/photos-for-passports\">digital photo</govuk-app-link></govuk-app-bulleted-list-item>\n  <govuk-app-bulleted-list-item><govuk-app-link href=\"https://www.gov.uk/apply-renew-passport\">start your online application</govuk-app-link></govuk-app-bulleted-list-item>\n</govuk-app-bulleted-list>"
        }
      ],
      "script": "src/components/link/link.js",
      "card": "components/link.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/link/"
    },
    {
      "name": "Link card",
      "element": "govuk-app-link-card",
      "slug": "link-card",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Makes one destination stand out, on a card of its own that's a link, with its name large and bold, such as the user's council on Home. A description above the name can say what it's for.",
      "attributes": {
        "href": {
          "type": "string",
          "required": true,
          "description": "Where the card goes, such as the council's website."
        },
        "description": {
          "type": "string",
          "description": "Shown above the name, in grey, saying what it's for, such as County councils are usually responsible for services like education, social care and transport."
        }
      },
      "content": "The name of where it goes, as text, such as Central Bedfordshire Council.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use it for one destination worth making stand out, such as the user's own council. For a list of links, use a grouped list.",
        "Put it under a section heading saying what it is, such as Your local services.",
        "Keep the name to what the user will recognise, such as the council's own name.",
        "Give each card a description when there are two or more, saying how they differ, as the app does for a county council and a district council."
      ],
      "avoid": [
        {
          "when": "For a list of links",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"link\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "link"
            }
          }
        },
        {
          "when": "For a link within a line of text",
          "instead": {
            "text": "govuk-app-link",
            "element": "govuk-app-link"
          }
        },
        {
          "when": "For a screen in the app, among others",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"navigation\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "navigation"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "A council",
          "html": "<govuk-app-link-card href=\"https://www.centralbedfordshire.gov.uk\">Central Bedfordshire Council</govuk-app-link-card>"
        },
        {
          "name": "With a description",
          "html": "<govuk-app-link-card href=\"https://www.derbyshire.gov.uk\" description=\"County councils are usually responsible for services like education, social care and transport\">Derbyshire County Council</govuk-app-link-card>"
        }
      ],
      "script": "src/components/link-card/link-card.js",
      "card": "components/link-card.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/link-card/"
    },
    {
      "name": "Menu button",
      "element": "govuk-app-menu-button",
      "slug": "menu-button",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Offers a few more things the user can do with something on a card, such as a vehicle or a driving licence, without crowding the card: a round “…” button that opens a menu of them.",
      "attributes": {
        "label": {
          "type": "string",
          "default": "More options",
          "description": "The button's name for screen readers, as the app's moreOptionsButtonAccessibilityLabel."
        },
        "name": {
          "type": "string",
          "description": "The button's name, to tell it apart when it's pressed."
        },
        "variant": {
          "type": "enum",
          "values": [
            "card",
            "chat"
          ],
          "default": "card",
          "description": "card: a filled circle with its dots cut out, in link blue, as on a vehicle's or a licence's card. chat: three blue dots on a white circle, as beside GOV.UK Chat's field. The chat input draws its own."
        }
      },
      "content": "Its menu's items, <govuk-app-menu-button-item> elements, top to bottom. Each is a link, with an href, or a button, with a name and value. Its label is what's written between its tags. Give it destructive to draw it in red, for one that deletes something, such as Clear chat, and icon to draw a Material Symbol at its end, such as delete.",
      "contains": {
        "text": true,
        "elements": [
          "govuk-app-menu-button-item"
        ]
      },
      "parts": {
        "govuk-app-menu-button-item": {
          "description": "One item in the menu, holding its label: a link, with an href, or a button, with a name and value.",
          "attributes": {
            "href": {
              "type": "string",
              "description": "Makes it a link to this page."
            },
            "name": {
              "type": "string",
              "description": "Without an href, makes it a button with this name, so a page listening for clicks can tell which was pressed."
            },
            "value": {
              "type": "string",
              "description": "Set on the button, alongside name, to say which of several it was."
            },
            "destructive": {
              "type": "boolean",
              "default": false,
              "description": "Draws it in red, for one that deletes something, such as Clear chat."
            },
            "icon": {
              "type": "string",
              "description": "A Material Symbol drawn at its end, such as delete."
            }
          },
          "contains": {
            "text": true
          }
        }
      },
      "rules": [
        "Use it for a few things the user can do with what's on its card, that don't need to be on show. Anything they'll want often belongs on the card itself.",
        "Put it at the top right of its card, as the app does.",
        "Keep its menu short, a handful of items at most, each saying what it does, such as Change address.",
        "Label it for screen readers if More options doesn't say enough."
      ],
      "avoid": [
        {
          "when": "For an action the user will want often, on a card",
          "instead": {
            "text": "govuk-app-button variant=\"compact\"",
            "element": "govuk-app-button",
            "attributes": {
              "variant": "compact"
            }
          }
        },
        {
          "when": "For an action on the whole screen, not one card",
          "instead": {
            "text": "govuk-app-nav-bar-item",
            "element": "govuk-app-nav-bar-item"
          }
        },
        {
          "when": "To switch between views of the same thing",
          "instead": {
            "text": "govuk-app-segmented-control",
            "element": "govuk-app-segmented-control"
          }
        }
      ],
      "examples": [
        {
          "name": "A vehicle's menu",
          "html": "<govuk-app-menu-button name=\"vehicle-menu\">\n  <govuk-app-menu-button-item href=\"https://www.gov.uk/vehicle-tax\">Tax this vehicle</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item href=\"https://www.gov.uk/getting-an-mot\">Book an MOT</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"remove-vehicle\">Remove vehicle</govuk-app-menu-button-item>\n</govuk-app-menu-button>"
        },
        {
          "name": "GOV.UK Chat's menu",
          "html": "<govuk-app-menu-button variant=\"chat\" name=\"chat-menu\">\n  <govuk-app-menu-button-item name=\"clear-chat\" destructive icon=\"delete\">Clear chat</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"privacy\">Privacy notice</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"about\">About</govuk-app-menu-button-item>\n  <govuk-app-menu-button-item name=\"feedback\">Give feedback</govuk-app-menu-button-item>\n</govuk-app-menu-button>"
        }
      ],
      "script": "src/components/menu-button/menu-button.js",
      "card": "components/menu-button.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/menu-button/"
    },
    {
      "name": "Number plate",
      "element": "govuk-app-number-plate",
      "slug": "number-plate",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Shows a vehicle's registration number as it looks on the vehicle: on a yellow number plate, in the DVLA's own typeface. Small on a vehicle's card, large on its detail screen. A white front plate, blank, stands for any vehicle, such as on a search for one.",
      "attributes": {
        "size": {
          "type": "enum",
          "values": [
            "small",
            "large"
          ],
          "default": "small",
          "description": "small, as on a vehicle's card, growing with the text size; large, as on a vehicle's detail screen."
        },
        "variant": {
          "type": "enum",
          "values": [
            "rear",
            "front"
          ],
          "default": "rear",
          "description": "rear: yellow, as the app shows a vehicle's registration. front: white, with a thicker stroke, as the app draws the blank ABC plate on its vehicle search."
        }
      },
      "content": "The registration number, as it's written on the plate, such as AB71 CDE.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use it only for a vehicle's registration number.",
        "Write the registration as it's shown on the plate, in capitals, with its space, such as AB71 CDE.",
        "Use small beside a vehicle's name, such as on its card, and large on its own on the vehicle's detail screen.",
        "Use the rear plate for a vehicle's registration. Use the front plate for a blank one, ABC, that stands for any vehicle, such as on a search for one."
      ],
      "avoid": [
        {
          "when": "For any other number or reference, such as a driving licence number",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"information\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "information"
            }
          }
        },
        {
          "when": "For the user to type in a registration",
          "instead": {
            "text": "govuk-app-search-box",
            "element": "govuk-app-search-box"
          }
        },
        {
          "when": "For a vehicle's other facts, such as its year or fuel",
          "instead": {
            "text": "govuk-app-labelled-icon",
            "element": "govuk-app-labelled-icon"
          }
        }
      ],
      "examples": [
        {
          "name": "Small",
          "html": "<govuk-app-number-plate>AB71 CDE</govuk-app-number-plate>"
        },
        {
          "name": "Front, blank, as on a vehicle search",
          "html": "<govuk-app-number-plate variant=\"front\">ABC</govuk-app-number-plate>"
        }
      ],
      "script": "src/components/number-plate/number-plate.js",
      "card": "components/number-plate.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/number-plate/"
    },
    {
      "name": "Section",
      "element": "govuk-app-section",
      "slug": "section",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Groups part of a screen under a title, with a line saying what it's for if it needs one, and spaces it from what's above, so a long screen reads as a few clear parts: such as Check vehicle details, Status or Registered to.",
      "attributes": {
        "title": {
          "type": "string",
          "required": true,
          "description": "Its title, such as Check vehicle details."
        },
        "description": {
          "type": "string",
          "description": "A line under the title saying what it's for, such as Tax and MOT information for any vehicle."
        },
        "level": {
          "type": "enum",
          "values": [
            "2",
            "3",
            "4"
          ],
          "default": "2",
          "description": "The title's place in the screen's outline. Drawn as h2 to h4."
        }
      },
      "content": "What the section holds, such as a grouped list or an address, top to bottom, 16pt apart. Something with slot=\"accessory\", such as a <govuk-app-number-plate>, goes on the right of its title.",
      "contains": {
        "elements": "any",
        "slots": {
          "accessory": "any"
        }
      },
      "rules": [
        "Use sections to break a long screen into a few parts, each with a title that says what's in it.",
        "Give it a description only when the title alone doesn't say what the section is for.",
        "Put sections one after another in a screen: each is spaced from what's above it, as the app spaces its sections. The first on a screen isn't.",
        "For a list with a title and nothing else, a grouped list's own title is enough."
      ],
      "avoid": [
        {
          "when": "For a list of rows that needs only a title",
          "instead": {
            "text": "govuk-app-grouped-list title=\"Privacy and legal\"",
            "element": "govuk-app-grouped-list",
            "attributes": {
              "title": "Privacy and legal"
            }
          }
        },
        {
          "when": "For a section the user can act on as a whole, such as a widget with Edit",
          "instead": {
            "text": "govuk-app-section-heading",
            "element": "govuk-app-section-heading"
          }
        },
        {
          "when": "For the screen's own title",
          "instead": {
            "text": "govuk-app-heading level=\"1\"",
            "element": "govuk-app-heading",
            "attributes": {
              "level": "1"
            }
          }
        },
        {
          "when": "To put a few components side by side",
          "instead": {
            "text": "govuk-app-stack direction=\"horizontal\"",
            "element": "govuk-app-stack",
            "attributes": {
              "direction": "horizontal"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "With a description",
          "html": "<govuk-app-section title=\"Check vehicle details\" description=\"Tax and MOT information for any vehicle\">\n  <govuk-app-grouped-list>\n    <govuk-app-grouped-list-row name=\"check-vehicle\">Search for a vehicle</govuk-app-grouped-list-row>\n  </govuk-app-grouped-list>\n</govuk-app-section>"
        },
        {
          "name": "Something beside its title",
          "html": "<govuk-app-section title=\"Overview\">\n  <govuk-app-number-plate slot=\"accessory\">LH09 PZ2</govuk-app-number-plate>\n  <govuk-app-grouped-list background=\"subtle\">\n    <govuk-app-grouped-list-row name=\"tech-specs\">Tech specs</govuk-app-grouped-list-row>\n  </govuk-app-grouped-list>\n</govuk-app-section>"
        }
      ],
      "script": "src/components/section/section.js",
      "card": "components/section.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/section/"
    },
    {
      "name": "Section heading",
      "element": "govuk-app-section-heading",
      "slug": "section-heading",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Heads a section of a screen, such as a widget on the home screen, with an action for the whole section beside it if it has one, such as Edit or See all.",
      "attributes": {
        "level": {
          "type": "enum",
          "values": [
            "1",
            "2",
            "3",
            "4",
            "5",
            "6"
          ],
          "default": "2",
          "description": "Its place in the screen's outline. Drawn as h1 to h6, always in Title 3."
        },
        "action": {
          "type": "string",
          "description": "The action's text, such as Edit or See all. Without it, there is no action."
        },
        "href": {
          "type": "string",
          "description": "Makes the action a link to this page."
        },
        "name": {
          "type": "string",
          "description": "The action's button's name, to tell which was pressed."
        },
        "value": {
          "type": "string",
          "description": "The action's button's value."
        }
      },
      "content": "The section's title.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use it over a section the user can act on as a whole, such as a home screen widget. For any other heading, use the heading.",
        "Give the action a short verb or phrase for what it does to the section: Edit, or See all. Never more than one action.",
        "Keep the title short, so it and the action fit on one line."
      ],
      "avoid": [
        {
          "when": "For a heading with no action",
          "instead": {
            "text": "govuk-app-heading",
            "element": "govuk-app-heading"
          }
        },
        {
          "when": "For a screen's title",
          "instead": {
            "text": "govuk-app-heading level=\"1\"",
            "element": "govuk-app-heading",
            "attributes": {
              "level": "1"
            }
          }
        },
        {
          "when": "For a part of a long screen, with a line saying what it's for",
          "instead": {
            "text": "govuk-app-section",
            "element": "govuk-app-section"
          }
        },
        {
          "when": "For several actions on a section",
          "instead": {
            "text": "govuk-app-menu-button",
            "element": "govuk-app-menu-button"
          }
        }
      ],
      "examples": [
        {
          "name": "With an action",
          "html": "<govuk-app-section-heading action=\"Edit\" name=\"edit-topics\">Topics</govuk-app-section-heading>"
        },
        {
          "name": "Without one",
          "html": "<govuk-app-section-heading>Your local services</govuk-app-section-heading>"
        }
      ],
      "script": "src/components/section-heading/section-heading.js",
      "card": "components/section-heading.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/section-heading/"
    },
    {
      "name": "Summary columns",
      "element": "govuk-app-summary-columns",
      "slug": "summary-columns",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Lays out a few short facts side by side, in equal columns with a divider between them, so they can be taken in at a glance: a vehicle's year, fuel and colour, a driver's offences and points, or a vehicle's tax and MOT.",
      "attributes": {},
      "content": "Two to four <govuk-app-summary-column> elements, left to right, each holding one component, such as a <govuk-app-labelled-icon>, a <govuk-app-count> or a <govuk-app-status>.",
      "contains": {
        "elements": [
          "govuk-app-summary-column"
        ]
      },
      "parts": {
        "govuk-app-summary-column": {
          "description": "One column, holding one component, such as a labelled icon, a count or a status.",
          "attributes": {},
          "contains": {
            "elements": "any"
          }
        }
      },
      "rules": [
        "Use it for two to four facts of the same kind, worth taking in at a glance. For more, or for longer ones, use a grouped list.",
        "Put the same kind of component in every column: all labelled icons, all counts, or all statuses.",
        "Keep what's in each column short, so it fits in a narrow column.",
        "Put it inside a card, such as a grouped list's content row with flush, with anything more about the facts, such as History, in a row below it."
      ],
      "avoid": [
        {
          "when": "For more than four facts, or longer ones",
          "instead": {
            "text": "govuk-app-grouped-list",
            "element": "govuk-app-grouped-list"
          }
        },
        {
          "when": "For facts of different kinds",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"information\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "information"
            }
          }
        },
        {
          "when": "To put a few components side by side that aren't facts, such as a number plate and a menu button",
          "instead": {
            "text": "govuk-app-stack direction=\"horizontal\"",
            "element": "govuk-app-stack",
            "attributes": {
              "direction": "horizontal"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "Labelled icons, as a vehicle's year, fuel and colour",
          "html": "<govuk-app-summary-columns>\n  <govuk-app-summary-column>\n    <govuk-app-labelled-icon icon=\"calendar_month\" label=\"Year of manufacture: 2021\">2021</govuk-app-labelled-icon>\n  </govuk-app-summary-column>\n  <govuk-app-summary-column>\n    <govuk-app-labelled-icon icon=\"local_gas_station\" label=\"Fuel: Petrol\">Petrol</govuk-app-labelled-icon>\n  </govuk-app-summary-column>\n  <govuk-app-summary-column>\n    <govuk-app-labelled-icon icon=\"palette\" label=\"Colour: Yellow\">Yellow</govuk-app-labelled-icon>\n  </govuk-app-summary-column>\n</govuk-app-summary-columns>"
        },
        {
          "name": "Counts (proposed), as a driver's offences and points",
          "html": "<govuk-app-summary-columns>\n  <govuk-app-summary-column>\n    <govuk-app-count value=\"2\">Offences</govuk-app-count>\n  </govuk-app-summary-column>\n  <govuk-app-summary-column>\n    <govuk-app-count value=\"12\">Points</govuk-app-count>\n  </govuk-app-summary-column>\n</govuk-app-summary-columns>"
        }
      ],
      "script": "src/components/summary-columns/summary-columns.js",
      "card": "components/summary-columns.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/summary-columns/"
    },
    {
      "name": "Text field",
      "element": "govuk-app-text-field",
      "slug": "text-field",
      "kind": "govuk",
      "inApp": true,
      "purpose": "Asks the user to type a short answer, such as their postcode, under a heading asking the question, with a hint of what to type and, if what they typed won't do, an error saying what to do.",
      "attributes": {
        "label": {
          "type": "string",
          "required": true,
          "description": "The field's name for screen readers, such as Postcode. It isn't shown: the heading above asks the question."
        },
        "hint": {
          "type": "string",
          "description": "Shown above the field, in grey, saying what to type, such as For example SW1A 2AA."
        },
        "error": {
          "type": "string",
          "description": "Shown above the field, in red, when what the user typed won't do, saying what to do, such as Enter your postcode."
        },
        "type": {
          "type": "enum",
          "values": [
            "text",
            "email",
            "tel",
            "url",
            "password",
            "postcode"
          ],
          "default": "text",
          "description": "What's typed, so the phone shows the keyboard for it. postcode types in capitals, with the browser offering the user's own."
        },
        "name": {
          "type": "string",
          "description": "The name what the user typed is sent as, in a form."
        },
        "value": {
          "type": "string",
          "description": "Text already in the field."
        },
        "placeholder": {
          "type": "string",
          "description": "What the field shows until the user types. The app's postcode field has none: put what to type in the hint, which stays."
        },
        "autocomplete": {
          "type": "string",
          "description": "What the browser may fill in for the user, such as email or postal-code."
        }
      },
      "content": null,
      "contains": {},
      "rules": [
        "Put it under a heading asking the question, such as What is your postcode?, and give it a label for screen readers with the answer's name, such as Postcode.",
        "Ask for one thing on a screen, with a primary button below to carry on.",
        "Put an example in the hint, not the placeholder, so it's still there once the user starts typing.",
        "Say what to do in the error, not what went wrong: Enter your postcode, not Postcode is empty.",
        "Put it in a form, so pressing Return on the keyboard sends it."
      ],
      "avoid": [
        {
          "when": "To search",
          "instead": {
            "text": "govuk-app-search-field",
            "element": "govuk-app-search-field"
          }
        },
        {
          "when": "To ask GOV.UK Chat",
          "instead": {
            "text": "govuk-app-chat-input",
            "element": "govuk-app-chat-input"
          }
        },
        {
          "when": "For something that's on or off",
          "instead": {
            "text": "govuk-app-toggle",
            "element": "govuk-app-toggle"
          }
        },
        {
          "when": "For a choice from a short list",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"selectable\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "selectable"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "A postcode",
          "html": "<govuk-app-heading level=\"1\" size=\"title-1\">What is your postcode?</govuk-app-heading>\n<govuk-app-text-field type=\"postcode\" name=\"postcode\" label=\"Postcode\" hint=\"For example SW1A 2AA\"></govuk-app-text-field>"
        },
        {
          "name": "With an error",
          "html": "<govuk-app-heading level=\"1\" size=\"title-1\">What is your postcode?</govuk-app-heading>\n<govuk-app-text-field type=\"postcode\" name=\"postcode\" label=\"Postcode\" hint=\"For example SW1A 2AA\" error=\"Enter your postcode\"></govuk-app-text-field>"
        }
      ],
      "script": "src/components/text-field/text-field.js",
      "card": "components/text-field.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/text-field/"
    },
    {
      "name": "Full-screen cover",
      "element": "govuk-app-full-screen-cover",
      "slug": "full-screen-cover",
      "kind": "native",
      "inApp": true,
      "purpose": "Presents a screen over the one the user was on, covering it entirely, for a journey that takes over the app until it's finished or closed, such as adding a driver and vehicles account. Unlike a sheet, nothing of the screen behind shows.",
      "attributes": {
        "present": {
          "type": "boolean",
          "default": false,
          "description": "Brings the cover up from the bottom when the page loads, as UIKit presents it. Give it to the first screen of the journey, and not to the screens after it, which are already in the cover."
        },
        "label": {
          "type": "string",
          "description": "The cover's name for screen readers. Leave it off if its screen has a heading or a navigation bar title."
        }
      },
      "content": "The cover's screen, a <govuk-app-screen>. Optionally, the screen it was presented from, with slot=\"behind\", which is seen only while the cover comes up over it, and can't be used.",
      "contains": {
        "elements": [
          "govuk-app-screen"
        ],
        "slots": {
          "behind": [
            "govuk-app-screen"
          ]
        }
      },
      "rules": [
        "Put a full-screen cover directly in a <govuk-app>, in place of a screen. Give the root a size, as for a screen.",
        "Use a sheet for most modals, as the app does. Use a full-screen cover only where the app does: for a journey that takes over the app, such as adding a driver and vehicles account.",
        "Give its screen a way out: a close action on the left of its navigation bar, with slot=\"leading\". It can't be pulled down to close.",
        "Give present only to the first screen of the journey. Later screens of the same journey are already in the cover.",
        "To draw the app's green screens, give its screen background=\"green\", its text size=\"title-1\", and its button variant=\"black\"."
      ],
      "avoid": [
        {
          "when": "For a task the user finishes or cancels before going back, such as signing out or choosing a country",
          "instead": {
            "text": "govuk-app-sheet",
            "element": "govuk-app-sheet"
          }
        },
        {
          "when": "For the next screen of a journey, pushed on top of the last",
          "instead": {
            "text": "A govuk-app-screen of its own, with a back button in its navigation bar.",
            "element": "govuk-app-screen"
          }
        },
        {
          "when": "For a few things to do with something on a card",
          "instead": {
            "text": "govuk-app-menu-button",
            "element": "govuk-app-menu-button"
          }
        }
      ],
      "examples": [
        {
          "name": "Adding a driver and vehicles account",
          "html": "<govuk-app-full-screen-cover>\n  <govuk-app-screen background=\"green\">\n    <govuk-app-nav-bar>\n      <govuk-app-nav-bar-item icon=\"close\" name=\"close\" slot=\"leading\">Close</govuk-app-nav-bar-item>\n    </govuk-app-nav-bar>\n    <govuk-app-heading level=\"1\" size=\"large-title\">Add your driver and vehicles account</govuk-app-heading>\n    <govuk-app-text size=\"title-1\">Keep track of your licence details, tax and MOT dates.</govuk-app-text>\n    <govuk-app-text size=\"title-1\">We’ll take you to your web browser to sign in.</govuk-app-text>\n    <govuk-app-button-stack slot=\"footer\">\n      <govuk-app-button variant=\"black\" name=\"continue\">Continue</govuk-app-button>\n    </govuk-app-button-stack>\n  </govuk-app-screen>\n</govuk-app-full-screen-cover>"
        },
        {
          "name": "Coming up over the screen it was presented from",
          "html": "<govuk-app-full-screen-cover present>\n  <govuk-app-screen slot=\"behind\">\n    <govuk-app-nav-bar title=\"Driving\" large-title back></govuk-app-nav-bar>\n    <govuk-app-text>Add your driver and vehicles account to see your licence details, tax and MOT dates.</govuk-app-text>\n  </govuk-app-screen>\n  <govuk-app-screen background=\"modal\">\n    <govuk-app-nav-bar title=\"A full-screen cover\">\n      <govuk-app-nav-bar-item icon=\"close\" name=\"close\" slot=\"leading\">Close</govuk-app-nav-bar-item>\n    </govuk-app-nav-bar>\n    <govuk-app-text>Nothing of the screen behind shows once it's up.</govuk-app-text>\n  </govuk-app-screen>\n</govuk-app-full-screen-cover>"
        }
      ],
      "script": "src/components/full-screen-cover/full-screen-cover.js",
      "card": "components/full-screen-cover.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/full-screen-cover/"
    },
    {
      "name": "Heading",
      "element": "govuk-app-heading",
      "slug": "heading",
      "kind": "native",
      "inApp": true,
      "purpose": "Titles a screen, or a section of one. Its level says where it sits in the screen's outline, for screen readers; its size, which of the app's text styles it is drawn in.",
      "attributes": {
        "level": {
          "type": "enum",
          "values": [
            "1",
            "2",
            "3",
            "4",
            "5",
            "6"
          ],
          "default": "2",
          "description": "Its place in the screen's outline: 1 is the screen's title, 2 a section of it, 3 a part of a section. Drawn as h1 to h6."
        },
        "size": {
          "type": "enum",
          "values": [
            "large-title",
            "title-1",
            "title-2",
            "title-3",
            "body"
          ],
          "description": "The text style it is drawn in. Without one, level 1 is Large Title, level 2 is Title 3, and anything smaller is Body, emphasised."
        },
        "align": {
          "type": "enum",
          "values": [
            "start",
            "center"
          ],
          "default": "start",
          "description": "center, as the app's onboarding and information screens set their titles."
        }
      },
      "content": "The heading's text.",
      "contains": {
        "text": true
      },
      "rules": [
        "Give every screen one level 1 heading, unless its navigation bar has a title, which is the screen's heading instead.",
        "Don't skip levels: a level 3 heading goes inside a section with a level 2 one.",
        "Pick the level for the outline and the size for the look. A screen's question, such as What is your postcode?, is level 1 in Title 1; an outcome, such as a confirmation, is level 1 in Large Title.",
        "Centre a heading only on screens the app centres: onboarding, information and confirmation screens. Centre the text under it too.",
        "Write headings in sentence case, without a full stop. A question ends with a question mark."
      ],
      "avoid": [
        {
          "when": "Over a section the user can act on as a whole, such as a widget with Edit",
          "instead": {
            "text": "govuk-app-section-heading",
            "element": "govuk-app-section-heading"
          }
        },
        {
          "when": "For a part of a long screen, with its title and the space above it",
          "instead": {
            "text": "govuk-app-section",
            "element": "govuk-app-section"
          }
        },
        {
          "when": "For a title over a list of rows",
          "instead": {
            "text": "govuk-app-grouped-list title=\"Privacy and legal\"",
            "element": "govuk-app-grouped-list",
            "attributes": {
              "title": "Privacy and legal"
            }
          }
        },
        {
          "when": "For a screen's title, when it has a navigation bar",
          "instead": {
            "text": "govuk-app-nav-bar title=\"Settings\"",
            "element": "govuk-app-nav-bar",
            "attributes": {
              "title": "Settings"
            }
          }
        },
        {
          "when": "For a line that should stand out, but doesn't head anything",
          "instead": {
            "text": "govuk-app-text emphasis",
            "element": "govuk-app-text",
            "attributes": {
              "emphasis": true
            }
          }
        },
        {
          "when": "For a few words that say what the rest of a line is",
          "instead": {
            "text": "govuk-app-strong",
            "element": "govuk-app-strong"
          }
        }
      ],
      "examples": [
        {
          "name": "Each size",
          "html": "<govuk-app-heading level=\"1\" size=\"large-title\">Large Title</govuk-app-heading>\n<govuk-app-heading level=\"1\" size=\"title-1\">Title 1</govuk-app-heading>\n<govuk-app-heading level=\"2\" size=\"title-2\">Title 2</govuk-app-heading>\n<govuk-app-heading level=\"2\" size=\"title-3\">Title 3</govuk-app-heading>\n<govuk-app-heading level=\"3\" size=\"body\">Body</govuk-app-heading>"
        },
        {
          "name": "Centred, on an onboarding screen",
          "html": "<govuk-app-heading level=\"1\" align=\"center\">Allow notifications?</govuk-app-heading>"
        }
      ],
      "script": "src/components/heading/heading.js",
      "card": "components/heading.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/heading/"
    },
    {
      "name": "Navigation bar",
      "element": "govuk-app-nav-bar",
      "slug": "nav-bar",
      "kind": "native",
      "inApp": true,
      "purpose": "Says which screen the user is on, takes them back to the screen they came from, and holds the screen's actions, such as close, done or edit. It sits at the top of every screen that isn't a top-level one, and of some that are.",
      "attributes": {
        "title": {
          "type": "string",
          "description": "The screen's title, drawn in the bar as the screen's heading. Leave it off where the content starts with its own heading."
        },
        "large-title": {
          "type": "boolean",
          "default": false,
          "description": "Draws the title large, below the bar. It scrolls with the content, and the title appears in the bar once it has gone under it."
        },
        "back": {
          "type": "boolean",
          "default": false,
          "description": "Shows a back button, named back, for the page to listen for."
        },
        "back-href": {
          "type": "string",
          "description": "Shows a back button that is a link to this page. Use it in place of back in a prototype of several pages."
        }
      },
      "content": "Up to three <govuk-app-nav-bar-item> elements, the screen's actions, drawn on the right in order. One with slot=\"leading\" is drawn on the left instead, where the back button would be, as the app draws close on a full-screen cover. Each takes an icon attribute, the name of a Material Symbol (such as close, check or more_horiz), or none, to draw its text instead; an href, to make it a link to another page, or name and value, to tell it apart as a button. What is written between its tags is its text, or, with an icon, its name for screen readers.",
      "contains": {
        "elements": [
          "govuk-app-nav-bar-item"
        ],
        "slots": {
          "leading": [
            "govuk-app-nav-bar-item"
          ]
        }
      },
      "parts": {
        "govuk-app-nav-bar-item": {
          "description": "One of the screen's actions in the bar: its text, or with an icon, its name for screen readers.",
          "attributes": {
            "icon": {
              "type": "string",
              "description": "A Material Symbol to draw, such as close, check or more_horiz, in place of its text."
            },
            "href": {
              "type": "string",
              "description": "Makes it a link to this page."
            },
            "name": {
              "type": "string",
              "description": "Without an href, makes it a button with this name, so a page listening for clicks can tell which was pressed."
            },
            "value": {
              "type": "string",
              "description": "Set on the button, alongside name, to say which of several it was."
            }
          },
          "contains": {
            "text": true
          }
        }
      },
      "rules": [
        "Put it first in the screen, before the content. It sticks to the top of the screen and the content scrolls under it.",
        "Give a screen a title unless its content starts with its own heading, as the app's forms do, such as What is your address?",
        "Use a large title where the app does, such as Settings and Pages you've visited. Use the inline title on other screens, and on forms and modals.",
        "Show a back button on every screen pushed on top of another, and never on a top-level screen or the first screen of a modal.",
        "Close a modal with an action on the right, icon close, named for what it does. Confirm one with icon check.",
        "Use icons for the actions iOS draws as icons (close, check, more_horiz for a menu). Use a word, such as Edit, for anything else.",
        "Put close on the left, with slot=\"leading\", only on a full-screen cover, as the app does: a sheet has it on the right.",
        "Keep titles short enough to fit on one line. A long title is cut off."
      ],
      "avoid": [
        {
          "when": "On Home",
          "instead": {
            "text": "govuk-app-home-header",
            "element": "govuk-app-home-header"
          }
        },
        {
          "when": "For the action that moves the journey on, such as Continue",
          "instead": {
            "text": "govuk-app-button-stack",
            "element": "govuk-app-button-stack"
          }
        },
        {
          "when": "To move between the app's sections, Home, Chat and Settings",
          "instead": {
            "text": "govuk-app-tab-bar",
            "element": "govuk-app-tab-bar"
          }
        },
        {
          "when": "For a heading within the content, such as a form's question",
          "instead": {
            "text": "govuk-app-heading level=\"1\" size=\"title-1\"",
            "element": "govuk-app-heading",
            "attributes": {
              "level": "1",
              "size": "title-1"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "Back and an inline title",
          "html": "<govuk-app-nav-bar title=\"Notifications\" back></govuk-app-nav-bar>"
        },
        {
          "name": "Large title",
          "html": "<govuk-app-nav-bar title=\"Settings\" large-title></govuk-app-nav-bar>"
        }
      ],
      "script": "src/components/nav-bar/nav-bar.js",
      "card": "components/nav-bar.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/nav-bar/"
    },
    {
      "name": "Screen",
      "element": "govuk-app-screen",
      "slug": "screen",
      "kind": "native",
      "inApp": true,
      "purpose": "Lays out one screen of the app: the navigation bar at the top, the content, which scrolls, and the tab bar or a button stack at the bottom. Write a screen's components inside it in order, top to bottom.",
      "attributes": {
        "background": {
          "type": "enum",
          "values": [
            "page",
            "modal",
            "green",
            "chat"
          ],
          "default": "page",
          "description": "page: the app's pale blue, for screens in its sections. modal: white, for a screen presented over them, such as a question or a confirmation. green: the app's green, the same in light and dark, with white text and its content set further down, for a screen that takes over the app, in a full-screen cover. chat: GOV.UK Chat's, the same pale blue, with its conversation kept below the status bar and above the chat input, rather than scrolling under them, as the app's chat screen does."
        }
      },
      "content": "The screen's components, top to bottom. A <govuk-app-nav-bar>, or the home screen's <govuk-app-home-header>, goes at the top and sticks there. A <govuk-app-tab-bar> goes at the bottom of the content and floats over it. An element with slot=\"footer\", usually a <govuk-app-button-stack>, is pinned below the content, with the tab bar below it if there is one, as GOV.UK Chat's field is. Everything else is the content, 16pt in from the sides and 16pt apart, and scrolls.",
      "contains": {
        "elements": "any",
        "slots": {
          "footer": "any"
        }
      },
      "rules": [
        "Put a screen directly in a <govuk-app>, and give the root a size: the screen fills it, and scrolls inside it.",
        "Use one screen for each screen of a journey. In a prototype of several pages, put each on its own page.",
        "Give a screen either a tab bar or a button stack, not both: the app hides the tab bar on screens that ask the user to act. GOV.UK Chat's field is the one footer the app shows above its tab bar.",
        "Use the modal background for screens presented over the app, such as a sign-out confirmation, and the page background for the rest.",
        "Use the green background only for a screen that takes over the app, in a full-screen cover, as the app does when adding a driver and vehicles account. Give it a black button.",
        "Use the chat background for GOV.UK Chat's screens, with a chat input in its footer."
      ],
      "avoid": [
        {
          "when": "For a task over the screen the user was on, such as signing out",
          "instead": {
            "text": "A govuk-app-sheet, with the screen inside it.",
            "element": "govuk-app-sheet"
          }
        },
        {
          "when": "For a journey that takes over the app until it's done",
          "instead": {
            "text": "A govuk-app-full-screen-cover, with the screen inside it.",
            "element": "govuk-app-full-screen-cover"
          }
        },
        {
          "when": "For a part of a screen",
          "instead": {
            "text": "govuk-app-section",
            "element": "govuk-app-section"
          }
        }
      ],
      "examples": [
        {
          "name": "A modal screen with buttons",
          "html": "<govuk-app-screen background=\"modal\">\n  <p>If you’re using Face ID or Touch ID to unlock the app, this will be turned off. You can turn it on again the next time you sign in.</p>\n  <govuk-app-button-stack slot=\"footer\">\n    <govuk-app-button variant=\"destructive\" name=\"sign-out\">Sign out</govuk-app-button>\n    <govuk-app-button variant=\"grouped-secondary\" name=\"cancel\">Cancel</govuk-app-button>\n  </govuk-app-button-stack>\n</govuk-app-screen>"
        },
        {
          "name": "A page pushed on top, with a button",
          "html": "<govuk-app-screen>\n  <govuk-app-nav-bar title=\"Your app data\" back></govuk-app-nav-bar>\n  <p>We store a small amount of data about you to improve your experience in the app.</p>\n  <p>You can ask for a copy of it.</p>\n  <govuk-app-button-stack slot=\"footer\">\n    <govuk-app-button name=\"request\">Request your data</govuk-app-button>\n  </govuk-app-button-stack>\n</govuk-app-screen>"
        }
      ],
      "script": "src/components/screen/screen.js",
      "card": "components/screen.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/screen/"
    },
    {
      "name": "Search field",
      "element": "govuk-app-search-field",
      "slug": "search-field",
      "kind": "native",
      "inApp": true,
      "purpose": "Lets the user type what they're looking for and search for it, such as searching GOV.UK from the home screen, or filtering a list of countries.",
      "attributes": {
        "placeholder": {
          "type": "string",
          "default": "Search",
          "description": "What the field says while it's empty, and its name for screen readers unless it has a label."
        },
        "label": {
          "type": "string",
          "description": "Its name for screen readers, if the placeholder doesn't say what it searches, such as Search for a country."
        },
        "value": {
          "type": "string",
          "description": "What is already typed in the field, such as the search the user made to get to a page of results."
        },
        "name": {
          "type": "string",
          "default": "q",
          "description": "The name what the user typed is sent under when they search."
        },
        "action": {
          "type": "string",
          "description": "The page to go to when the user searches, such as a page of results. Without it, the same page, with what they typed added to its address."
        }
      },
      "content": "Nothing.",
      "contains": {},
      "rules": [
        "On the home screen, put it in the <govuk-app-home-header>. Elsewhere, put it at the top of the content, above what it searches.",
        "Leave the placeholder as Search, as the app does everywhere. Where the field searches something narrower than GOV.UK, such as a list of countries, say so to screen readers with a label.",
        "Give it an action to go to a page of results in a prototype of several pages."
      ],
      "avoid": [
        {
          "when": "To search for something on a card of its own, such as a vehicle's registration",
          "instead": {
            "text": "govuk-app-search-box",
            "element": "govuk-app-search-box"
          }
        },
        {
          "when": "To ask a question the user answers to carry on, such as their postcode",
          "instead": {
            "text": "govuk-app-text-field type=\"postcode\"",
            "element": "govuk-app-text-field",
            "attributes": {
              "type": "postcode"
            }
          }
        },
        {
          "when": "To ask GOV.UK Chat",
          "instead": {
            "text": "govuk-app-chat-input",
            "element": "govuk-app-chat-input"
          }
        }
      ],
      "examples": [
        {
          "name": "Empty",
          "html": "<govuk-app-search-field></govuk-app-search-field>"
        },
        {
          "name": "Going to a page of results",
          "html": "<govuk-app-search-field action=\"#results\"></govuk-app-search-field>"
        }
      ],
      "script": "src/components/search-field/search-field.js",
      "card": "components/search-field.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/search-field/"
    },
    {
      "name": "Segmented control",
      "element": "govuk-app-segmented-control",
      "slug": "segmented-control",
      "kind": "native",
      "inApp": true,
      "purpose": "Switches between two or three views of the same thing, side by side, such as a driving account's Vehicles and Licence, or Your topics and All topics.",
      "attributes": {
        "label": {
          "type": "string",
          "description": "Its name for screen readers, such as Driving, as the app's picker's label."
        }
      },
      "content": "Two or three <govuk-app-segmented-control-item> elements, left to right. Mark the one that's showing selected. Give each an href, to make it a link to another page, or name and value, to tell it apart as a button. Its label is what's written between its tags.",
      "contains": {
        "elements": [
          "govuk-app-segmented-control-item"
        ]
      },
      "parts": {
        "govuk-app-segmented-control-item": {
          "description": "One segment, holding its label: a link to another page, or a button.",
          "attributes": {
            "href": {
              "type": "string",
              "description": "Makes it a link to this page."
            },
            "name": {
              "type": "string",
              "description": "Without an href, makes it a button with this name, so a page listening for clicks can tell which was pressed."
            },
            "value": {
              "type": "string",
              "description": "Set on the button, alongside name, to say which of several it was."
            },
            "selected": {
              "type": "boolean",
              "default": false,
              "description": "The segment that's showing."
            }
          },
          "contains": {
            "text": true
          }
        }
      },
      "rules": [
        "Use it to switch between views of the same thing, not to go somewhere new: for that, use a navigation row or the tab bar.",
        "Use two or three segments, each one short word or two, so they fit side by side.",
        "Select exactly one segment: the one whose view is showing.",
        "Put it at the top of what it switches, 16pt in from the screen's edges, as the app does."
      ],
      "avoid": [
        {
          "when": "To go to another screen",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"navigation\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "navigation"
            }
          }
        },
        {
          "when": "To move between the app's sections, Home, Chat and Settings",
          "instead": {
            "text": "govuk-app-tab-bar",
            "element": "govuk-app-tab-bar"
          }
        },
        {
          "when": "To switch a setting on or off",
          "instead": {
            "text": "govuk-app-toggle",
            "element": "govuk-app-toggle"
          }
        },
        {
          "when": "For more than three views",
          "instead": {
            "text": "A grouped list of navigation rows, one for each, each going to its own screen."
          }
        }
      ],
      "examples": [
        {
          "name": "Two segments",
          "html": "<govuk-app-segmented-control label=\"Driving\">\n  <govuk-app-segmented-control-item name=\"vehicles\" selected>Vehicles</govuk-app-segmented-control-item>\n  <govuk-app-segmented-control-item name=\"licence\">Licence</govuk-app-segmented-control-item>\n</govuk-app-segmented-control>"
        },
        {
          "name": "Segments that link to other pages",
          "html": "<govuk-app-segmented-control label=\"Topics\">\n  <govuk-app-segmented-control-item href=\"#your-topics\" selected>Your topics</govuk-app-segmented-control-item>\n  <govuk-app-segmented-control-item href=\"#all-topics\">All topics</govuk-app-segmented-control-item>\n</govuk-app-segmented-control>"
        }
      ],
      "script": "src/components/segmented-control/segmented-control.js",
      "card": "components/segmented-control.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/segmented-control/"
    },
    {
      "name": "Sheet",
      "element": "govuk-app-sheet",
      "slug": "sheet",
      "kind": "native",
      "inApp": true,
      "purpose": "Presents a screen over the one the user was on, for a task they finish or cancel before going back, such as signing out, finding their local council or choosing a country. The screen it was presented from is set back behind it.",
      "attributes": {
        "present": {
          "type": "boolean",
          "default": false,
          "description": "Brings the sheet up from the bottom when the page loads, or when it's added to the page, as UIKit presents it. Give it to the first screen of a modal journey, and not to the screens after it, which are already in the sheet."
        },
        "label": {
          "type": "string",
          "description": "The sheet's name for screen readers, such as Sign out. Leave it off if its screen has a heading or a navigation bar title."
        }
      },
      "content": "The sheet's screen, a <govuk-app-screen>, usually with background=\"modal\", starting with a <govuk-app-nav-bar> that has a close action. Optionally, the screen it was presented from, with slot=\"behind\", which is drawn set back behind it and can't be used.",
      "contains": {
        "elements": [
          "govuk-app-screen"
        ],
        "slots": {
          "behind": [
            "govuk-app-screen"
          ]
        }
      },
      "rules": [
        "Put a sheet directly in a <govuk-app>, in place of a screen. Give the root a size, as for a screen.",
        "Use a sheet for a task the user finishes or cancels before going back, as the app does: signing out, finding their local council, choosing a country, linking an account.",
        "Always give the sheet's screen a navigation bar with a close action, so it can be dismissed, even if it has Cancel in a button stack too. The sheet leaves room above the bar for it.",
        "Draw the screen it was presented from behind it, with slot=\"behind\", so the user can see where they'll go back to.",
        "Give present only to the first screen of the modal journey. Later screens of the same journey are already in the sheet."
      ],
      "avoid": [
        {
          "when": "For a journey that takes over the app until it's done, such as adding a driver and vehicles account",
          "instead": {
            "text": "govuk-app-full-screen-cover",
            "element": "govuk-app-full-screen-cover"
          }
        },
        {
          "when": "For the next screen of a journey, pushed on top of the last",
          "instead": {
            "text": "A govuk-app-screen of its own, with a back button in its navigation bar.",
            "element": "govuk-app-screen"
          }
        },
        {
          "when": "For a few things to do with something on a card",
          "instead": {
            "text": "govuk-app-menu-button",
            "element": "govuk-app-menu-button"
          }
        },
        {
          "when": "For something the user should know, that they needn't act on",
          "instead": {
            "text": "govuk-app-banner",
            "element": "govuk-app-banner"
          }
        }
      ],
      "examples": [
        {
          "name": "With a navigation bar and close action",
          "html": "<govuk-app-sheet>\n  <govuk-app-screen background=\"modal\">\n    <govuk-app-nav-bar title=\"Select a country\">\n      <govuk-app-nav-bar-item icon=\"close\" name=\"close\">Close</govuk-app-nav-bar-item>\n    </govuk-app-nav-bar>\n    <govuk-app-text>Get travel alerts for the countries you choose.</govuk-app-text>\n  </govuk-app-screen>\n</govuk-app-sheet>"
        }
      ],
      "script": "src/components/sheet/sheet.js",
      "card": "components/sheet.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/sheet/"
    },
    {
      "name": "Stack",
      "element": "govuk-app-stack",
      "slug": "stack",
      "kind": "native",
      "inApp": true,
      "purpose": "Lays out a few components in a row or a column, lined up and spaced as a screen needs, where no other component already does: such as a vehicle's number plate and menu button side by side on the right of its card, as the future driving designs show them.",
      "attributes": {
        "direction": {
          "type": "enum",
          "values": [
            "vertical",
            "horizontal"
          ],
          "default": "vertical",
          "description": "vertical, a column, as a VStack; horizontal, a row, as an HStack."
        },
        "align": {
          "type": "enum",
          "values": [
            "start",
            "center",
            "end"
          ],
          "default": "center",
          "description": "How its items line up across it: in a row, top, middle or bottom; in a column, left, centre or right."
        },
        "distribute": {
          "type": "enum",
          "values": [
            "start",
            "end",
            "between"
          ],
          "default": "start",
          "description": "Where its items go along it: at its start, at its end, or the first at the start and the last at the end, as with a Spacer between them."
        },
        "gap": {
          "type": "enum",
          "values": [
            "none",
            "extra-small",
            "small",
            "medium",
            "large"
          ],
          "default": "small",
          "description": "The space between its items, from the spacing scale: 0, 4, 8, 16 or 24pt."
        }
      },
      "content": "The components it lays out, in order.",
      "contains": {
        "elements": "any"
      },
      "rules": [
        "Use it only where no other component already lays things out: a screen, a section, a grouped list's content row and summary columns all space what they hold.",
        "Keep a row to a few short items, so they fit side by side on a phone.",
        "Leave gap at small, SwiftUI's own spacing, unless the design asks for another."
      ],
      "avoid": [
        {
          "when": "To space a screen's parts apart",
          "instead": {
            "text": "govuk-app-section",
            "element": "govuk-app-section"
          }
        },
        {
          "when": "For a few short facts side by side, with dividers between them",
          "instead": {
            "text": "govuk-app-summary-columns",
            "element": "govuk-app-summary-columns"
          }
        },
        {
          "when": "For buttons at the bottom of a screen",
          "instead": {
            "text": "govuk-app-button-stack",
            "element": "govuk-app-button-stack"
          }
        },
        {
          "when": "For rows on a card",
          "instead": {
            "text": "govuk-app-grouped-list",
            "element": "govuk-app-grouped-list"
          }
        }
      ],
      "examples": [
        {
          "name": "A heading and a number plate, at either end",
          "html": "<govuk-app-stack direction=\"horizontal\" distribute=\"between\">\n  <govuk-app-heading level=\"2\" size=\"title-2\">Lamborghini</govuk-app-heading>\n  <govuk-app-number-plate>LH09 PZ2</govuk-app-number-plate>\n</govuk-app-stack>"
        },
        {
          "name": "Two buttons side by side",
          "html": "<govuk-app-stack direction=\"horizontal\" gap=\"medium\">\n  <govuk-app-button variant=\"secondary\" name=\"no\">No</govuk-app-button>\n  <govuk-app-button name=\"yes\">Yes</govuk-app-button>\n</govuk-app-stack>"
        }
      ],
      "script": "src/components/stack/stack.js",
      "card": "components/stack.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/stack/"
    },
    {
      "name": "Tab bar",
      "element": "govuk-app-tab-bar",
      "slug": "tab-bar",
      "kind": "native",
      "inApp": true,
      "purpose": "Moves between the app's top-level sections: Home, Chat and Settings. It floats at the bottom of every screen in those sections, and shows which one the user is in.",
      "attributes": {},
      "content": "Two to five <govuk-app-tab-bar-item> elements, one for each tab, in order. Each takes an icon attribute, the name of a Material Symbol (such as home, chat_bubble or settings); an href, to make the tab a link to another page, or name and value, to tell it apart as a button; and selected, on the tab of the section the screen is in. Its label is what is written between its tags.",
      "contains": {
        "elements": [
          "govuk-app-tab-bar-item"
        ]
      },
      "parts": {
        "govuk-app-tab-bar-item": {
          "description": "One tab, holding its label.",
          "attributes": {
            "icon": {
              "type": "string",
              "required": true,
              "description": "A Material Symbol, such as home, chat_bubble or settings."
            },
            "href": {
              "type": "string",
              "description": "Makes it a link to this page."
            },
            "name": {
              "type": "string",
              "description": "Without an href, makes it a button with this name, so a page listening for clicks can tell which was pressed."
            },
            "value": {
              "type": "string",
              "description": "Set on the button, alongside name, to say which of several it was."
            },
            "selected": {
              "type": "boolean",
              "default": false,
              "description": "The tab of the section the screen is in."
            }
          },
          "contains": {
            "text": true
          }
        }
      },
      "rules": [
        "Use it only on the top-level screens of the app's sections. Hide it on screens a section pushes on top, and on modals, as the app does.",
        "Put it last in the screen, after the content. It sticks to the bottom of the screen and the content scrolls under it.",
        "Use the app's own tabs, in its order: Home (icon home), Chat (icon chat_bubble) and Settings (icon settings).",
        "Select exactly one tab: the one for the section the screen is in.",
        "Keep each label to one short word. Labels don't wrap, and are cut off if they are too long.",
        "In a prototype of several pages, give each tab an href to its section's first page, and mark that tab selected on each of its pages."
      ],
      "avoid": [
        {
          "when": "On a screen that asks the user to act, such as confirm or continue",
          "instead": {
            "text": "govuk-app-button-stack",
            "element": "govuk-app-button-stack"
          }
        },
        {
          "when": "On a screen pushed on top of another, or a modal",
          "instead": {
            "text": "Leave it out, and give the screen a back button or a close action in its navigation bar."
          }
        },
        {
          "when": "To switch between views of the same thing",
          "instead": {
            "text": "govuk-app-segmented-control",
            "element": "govuk-app-segmented-control"
          }
        }
      ],
      "examples": [
        {
          "name": "Home selected",
          "html": "<govuk-app-tab-bar>\n  <govuk-app-tab-bar-item icon=\"home\" name=\"home\" selected>Home</govuk-app-tab-bar-item>\n  <govuk-app-tab-bar-item icon=\"chat_bubble\" name=\"chat\">Chat</govuk-app-tab-bar-item>\n  <govuk-app-tab-bar-item icon=\"settings\" name=\"settings\">Settings</govuk-app-tab-bar-item>\n</govuk-app-tab-bar>"
        },
        {
          "name": "Settings selected, without Chat",
          "html": "<govuk-app-tab-bar>\n  <govuk-app-tab-bar-item icon=\"home\" name=\"home\">Home</govuk-app-tab-bar-item>\n  <govuk-app-tab-bar-item icon=\"settings\" name=\"settings\" selected>Settings</govuk-app-tab-bar-item>\n</govuk-app-tab-bar>"
        }
      ],
      "script": "src/components/tab-bar/tab-bar.js",
      "card": "components/tab-bar.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/tab-bar/"
    },
    {
      "name": "Text",
      "element": "govuk-app-text",
      "slug": "text",
      "kind": "native",
      "inApp": true,
      "purpose": "A paragraph of the app's text: Body, as most of it is, or a smaller style for details such as dates, captions and supporting information.",
      "attributes": {
        "size": {
          "type": "enum",
          "values": [
            "title-1",
            "body",
            "callout",
            "subheadline",
            "footnote",
            "caption-1",
            "caption-2"
          ],
          "default": "body",
          "description": "The text style it is drawn in. title-1 is Title 1, regular, larger than Body, as the app sets the text on its green screens."
        },
        "emphasis": {
          "type": "boolean",
          "default": false,
          "description": "Draws it semibold, as GovKit's bodySemibold and the like."
        },
        "colour": {
          "type": "enum",
          "values": [
            "primary",
            "secondary"
          ],
          "default": "primary",
          "description": "secondary: grey, text.secondary, for supporting text such as a date or a hint."
        },
        "align": {
          "type": "enum",
          "values": [
            "start",
            "center"
          ],
          "default": "start",
          "description": "center, under a centred heading, as on the app's onboarding and information screens."
        }
      },
      "content": "The paragraph's text. A few words of it can be bold, in a <govuk-app-strong>.",
      "contains": {
        "text": true,
        "inline": [
          "govuk-app-strong",
          "govuk-app-link"
        ]
      },
      "rules": [
        "Use Body for a screen's text. Use a smaller style only for supporting details, as the app does: Subheadline or Footnote for a date or a label, Caption for the smallest notes.",
        "Use Title 1 only for the few lines of a screen that takes over the app, such as a green one, as the app does.",
        "Use one text element for each paragraph. A screen spaces them 16pt apart.",
        "Use emphasis sparingly, for a word or line that has to stand out. For a heading, use the heading.",
        "Use the secondary colour only for supporting text, never for something the user must read to act.",
        "Centre text only under a centred heading."
      ],
      "avoid": [
        {
          "when": "For a screen's title, or a section's",
          "instead": {
            "text": "govuk-app-heading",
            "element": "govuk-app-heading"
          }
        },
        {
          "when": "For a few words that say what the rest of a line is",
          "instead": {
            "text": "govuk-app-strong",
            "element": "govuk-app-strong"
          }
        },
        {
          "when": "For a few points that are read together",
          "instead": {
            "text": "govuk-app-bulleted-list",
            "element": "govuk-app-bulleted-list"
          }
        },
        {
          "when": "For a name and postal address",
          "instead": {
            "text": "govuk-app-address",
            "element": "govuk-app-address"
          }
        },
        {
          "when": "For something the user should know now, set apart from the screen",
          "instead": {
            "text": "govuk-app-banner",
            "element": "govuk-app-banner"
          }
        }
      ],
      "examples": [
        {
          "name": "A paragraph",
          "html": "<govuk-app-text>If you’re using Face ID or Touch ID to unlock the app, this will be turned off. You can turn it on again the next time you sign in.</govuk-app-text>"
        },
        {
          "name": "Emphasised, and secondary",
          "html": "<govuk-app-text emphasis>Your MOT expires on 14 March 2027</govuk-app-text>\n<govuk-app-text size=\"subheadline\" colour=\"secondary\">Last checked today at 9:41am</govuk-app-text>"
        }
      ],
      "script": "src/components/text/text.js",
      "card": "components/text.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/text/"
    },
    {
      "name": "Toggle",
      "element": "govuk-app-toggle",
      "slug": "toggle",
      "kind": "native",
      "inApp": true,
      "purpose": "Switches something on or off straight away, such as sharing app usage statistics.",
      "attributes": {
        "checked": {
          "type": "boolean",
          "default": false,
          "description": "Whether it is on."
        },
        "label": {
          "type": "string",
          "description": "Its name for screen readers, such as Share app usage statistics. Leave it off inside a <label> that names it already."
        },
        "name": {
          "type": "string",
          "description": "Its name, to tell it apart in its change event or in a form."
        },
        "value": {
          "type": "string",
          "description": "Its value, sent with a form when it is on."
        }
      },
      "content": null,
      "contains": {},
      "rules": [
        "Use a toggle for something that takes effect as soon as it is switched, not for a choice confirmed with a button.",
        "For a setting in a list, use a grouped list's toggle row, as the app does on Settings. Use a toggle on its own only where there's no list for it.",
        "Always give it a name: a label, or a <label> around it and the text beside it.",
        "Name it for what it turns on, such as Share app usage statistics, not On or Off."
      ],
      "avoid": [
        {
          "when": "For a setting in a list, as on Settings",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"toggle\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "toggle"
            }
          }
        },
        {
          "when": "For a choice the user confirms with a button",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"selectable\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "selectable"
            }
          }
        },
        {
          "when": "To switch between views of the same thing",
          "instead": {
            "text": "govuk-app-segmented-control",
            "element": "govuk-app-segmented-control"
          }
        }
      ],
      "examples": [
        {
          "name": "On",
          "html": "<govuk-app-toggle name=\"statistics\" label=\"Share app usage statistics\" checked></govuk-app-toggle>"
        },
        {
          "name": "Off",
          "html": "<govuk-app-toggle name=\"statistics\" label=\"Share app usage statistics\"></govuk-app-toggle>"
        }
      ],
      "script": "src/components/toggle/toggle.js",
      "card": "components/toggle.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/toggle/"
    },
    {
      "name": "Card header",
      "element": "govuk-app-card-header",
      "slug": "card-header",
      "kind": "govuk",
      "inApp": false,
      "proposed": "a screenshot of the future driving designs in Figma, until there’s a link to the file",
      "purpose": "Shows at a glance how something on a card stands, when it needs attention: the top of the card in a colour for its state, holding its title, such as Disqualified, Revoked or Expired.",
      "attributes": {
        "tone": {
          "type": "enum",
          "values": [
            "caution",
            "warning",
            "danger"
          ],
          "default": "caution",
          "description": "caution: pale yellow, as for an expired licence. warning: yellow, as for a revoked one. danger: red, as for a disqualified driver."
        },
        "tall": {
          "type": "boolean",
          "default": false,
          "description": "Makes it at least 120pt tall, its content at the bottom, as the designs show a state that is the card's whole point, such as Disqualified."
        }
      },
      "content": "What it holds, such as a heading, or a line of text over one, 8pt apart.",
      "contains": {
        "elements": "any"
      },
      "rules": [
        "Use it only for a state that needs the user's attention, such as an expired, revoked or disqualified licence. A card that's fine has no header.",
        "Put the state in words in its title: the colour alone doesn't tell everyone.",
        "Match the tone to how serious the state is: caution for something to put right, warning for something that stops the user, danger for the most serious.",
        "Put it in a grouped list's first row, flush, so it fills the top of the card, and say what the state means, and what to do, in the rows below."
      ],
      "avoid": [
        {
          "when": "For a card that's fine, with nothing to put right",
          "instead": {
            "text": "Leave the header off, and say how it stands in the card's rows."
          }
        },
        {
          "when": "For how a vehicle's tax or MOT, or a licence, stands, when it needs no attention",
          "instead": {
            "text": "govuk-app-status",
            "element": "govuk-app-status"
          }
        },
        {
          "when": "For a warning about the whole screen, not one card",
          "instead": {
            "text": "govuk-app-banner type=\"warning\"",
            "element": "govuk-app-banner",
            "attributes": {
              "type": "warning"
            }
          }
        }
      ],
      "examples": [
        {
          "name": "Danger, tall, as a disqualified driver",
          "html": "<govuk-app-grouped-list>\n  <govuk-app-grouped-list-row type=\"content\" flush>\n    <govuk-app-card-header tone=\"danger\" tall>\n      <govuk-app-heading level=\"2\" size=\"title-1\">Disqualified</govuk-app-heading>\n    </govuk-app-card-header>\n  </govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"content\">\n    <govuk-app-text>You have been disqualified from driving until 24 April 2026.</govuk-app-text>\n  </govuk-app-grouped-list-row>\n</govuk-app-grouped-list>"
        },
        {
          "name": "Warning, tall, as a revoked licence",
          "html": "<govuk-app-grouped-list>\n  <govuk-app-grouped-list-row type=\"content\" flush>\n    <govuk-app-card-header tone=\"warning\" tall>\n      <govuk-app-heading level=\"2\" size=\"title-1\">Revoked</govuk-app-heading>\n    </govuk-app-card-header>\n  </govuk-app-grouped-list-row>\n  <govuk-app-grouped-list-row type=\"link\" href=\"https://www.gov.uk/apply-first-provisional-driving-licence\">Get a provisional licence</govuk-app-grouped-list-row>\n</govuk-app-grouped-list>"
        }
      ],
      "script": "src/components/card-header/card-header.js",
      "card": "components/card-header.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/card-header/"
    },
    {
      "name": "Count",
      "element": "govuk-app-count",
      "slug": "count",
      "kind": "govuk",
      "inApp": false,
      "proposed": "a screenshot of the future driving designs in Figma, until there’s a link to the file",
      "purpose": "Shows how many of something there are, big enough to take in at a glance, such as a driver's offences and penalty points.",
      "attributes": {
        "value": {
          "type": "string",
          "required": true,
          "description": "How many, such as 0 or 12."
        }
      },
      "content": "What it counts, a word or two, such as Offences or Points.",
      "contains": {
        "text": true
      },
      "rules": [
        "Use it for a number that matters on its own, at a glance, such as penalty points. For a number in a list, use a grouped list's count row.",
        "Say what it counts in a word or two, and make it agree with the number: 0 Offences, 1 Offence, 12 Points.",
        "Put two or three side by side in summary columns, with a way to see more, such as History, in a row below them."
      ],
      "avoid": [
        {
          "when": "For a number in a list, such as of unread messages",
          "instead": {
            "text": "govuk-app-grouped-list-row type=\"count\"",
            "element": "govuk-app-grouped-list-row",
            "attributes": {
              "type": "count"
            }
          }
        },
        {
          "when": "For how something with a deadline stands, such as days left on a vehicle's tax",
          "instead": {
            "text": "govuk-app-status",
            "element": "govuk-app-status"
          }
        },
        {
          "when": "For a number in a sentence",
          "instead": {
            "text": "govuk-app-text",
            "element": "govuk-app-text"
          }
        }
      ],
      "examples": [
        {
          "name": "A count",
          "html": "<govuk-app-count value=\"12\">Points</govuk-app-count>"
        },
        {
          "name": "A driver's offences and points, in summary columns",
          "html": "<govuk-app-summary-columns>\n  <govuk-app-summary-column>\n    <govuk-app-count value=\"2\">Offences</govuk-app-count>\n  </govuk-app-summary-column>\n  <govuk-app-summary-column>\n    <govuk-app-count value=\"12\">Points</govuk-app-count>\n  </govuk-app-summary-column>\n</govuk-app-summary-columns>"
        }
      ],
      "script": "src/components/count/count.js",
      "card": "components/count.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/count/"
    },
    {
      "name": "Search box",
      "element": "govuk-app-search-box",
      "slug": "search-box",
      "kind": "govuk",
      "inApp": false,
      "proposed": "a screenshot of the future driving designs in Figma, until there’s a link to the file",
      "purpose": "Lets the user type what they're looking for where they are and search for it, on a card of its own with a search button, such as a vehicle's registration to check its tax and MOT. A hint of what to type, such as a blank number plate, can sit inside it.",
      "attributes": {
        "placeholder": {
          "type": "string",
          "description": "What the box shows until the user types, such as Start, as the designs have it, or Search for a vehicle."
        },
        "label": {
          "type": "string",
          "description": "The box's name for screen readers, such as Registration number. Without it, they hear its placeholder."
        },
        "name": {
          "type": "string",
          "default": "q",
          "description": "The name what the user typed is sent as."
        },
        "value": {
          "type": "string",
          "description": "Text already in the box."
        },
        "action": {
          "type": "string",
          "description": "Where the search goes, such as the page of results. Without it, the page it's on."
        }
      },
      "content": "Optionally, an element with slot=\"accessory\", inside the box after the text, hinting at what to type, such as <govuk-app-number-plate variant=\"front\">ABC</govuk-app-number-plate>. Screen readers don't hear it.",
      "contains": {
        "slots": {
          "accessory": "any"
        }
      },
      "rules": [
        "Put it in a section that says what it searches for, such as Check a vehicle, with a description, such as View information for any vehicle.",
        "Give it a label saying what to type, such as Registration number, when its placeholder doesn't: screen readers don't hear its accessory.",
        "Give it an accessory only where it shows what to type, as a blank number plate does for a registration.",
        "For a search bar in the system's style, such as at the top of a screen or a list, use the search field."
      ],
      "avoid": [
        {
          "when": "To search GOV.UK, or filter a list, such as of countries",
          "instead": {
            "text": "govuk-app-search-field",
            "element": "govuk-app-search-field"
          }
        },
        {
          "when": "To ask a question on a form, with a button below to carry on",
          "instead": {
            "text": "govuk-app-text-field",
            "element": "govuk-app-text-field"
          }
        },
        {
          "when": "To ask GOV.UK Chat",
          "instead": {
            "text": "govuk-app-chat-input",
            "element": "govuk-app-chat-input"
          }
        }
      ],
      "examples": [
        {
          "name": "A vehicle's registration, with a blank number plate",
          "html": "<govuk-app-section title=\"Check a vehicle\" description=\"View information for any vehicle\">\n  <govuk-app-search-box placeholder=\"Start\" label=\"Registration number\" name=\"registration\" action=\"#vehicle\">\n    <govuk-app-number-plate slot=\"accessory\" variant=\"front\">ABC</govuk-app-number-plate>\n  </govuk-app-search-box>\n</govuk-app-section>"
        },
        {
          "name": "Without an accessory",
          "html": "<govuk-app-section title=\"Find your local council\" description=\"Check which council looks after where you live\">\n  <govuk-app-search-box placeholder=\"Postcode\" name=\"postcode\" action=\"#council\"></govuk-app-search-box>\n</govuk-app-section>"
        }
      ],
      "script": "src/components/search-box/search-box.js",
      "card": "components/search-box.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/search-box/"
    },
    {
      "name": "Status",
      "element": "govuk-app-status",
      "slug": "status",
      "kind": "govuk",
      "inApp": false,
      "proposed": "a screenshot of the future driving designs in Figma, until there’s a link to the file",
      "purpose": "Shows the state of something with a deadline or a validity, such as a vehicle's tax or MOT, or a driving licence: an icon for its state, then what it is and how it stands, such as Valid, 23 days, or Expired.",
      "attributes": {
        "state": {
          "type": "enum",
          "values": [
            "valid",
            "due",
            "expired",
            "none"
          ],
          "default": "valid",
          "description": "valid: a green dot. due: a purple ring, filled as far as progress, for something coming up. expired: a circled exclamation mark. none: no icon, for something that doesn't apply, such as an MOT that isn't required."
        },
        "progress": {
          "type": "string",
          "default": "1",
          "description": "For a due status, how full its ring is, from 0 to 1, such as 0.75. Make it the share of the time left, so it empties as the deadline nears."
        },
        "label": {
          "type": "string",
          "required": true,
          "description": "What it is, in Body Semibold, such as Tax, MOT due or Tax expiring."
        },
        "detail": {
          "type": "string",
          "description": "Anything to say after the label on the same line, not in bold, such as a date: 12 May 2026."
        },
        "caption": {
          "type": "string",
          "description": "The line below, in Subheadline, grey, such as Valid, 23 days, Expired or Not required."
        }
      },
      "content": null,
      "contains": {},
      "rules": [
        "Say the state in words as well, in the caption or the label: the icon alone doesn't tell everyone, such as people who can't see it or can't tell its colours apart.",
        "Use due for something with a deadline coming up, and count down to it in the caption, such as 23 days. Give it a progress to match.",
        "Use none, not valid, for something that doesn't apply, and say so: Not required.",
        "Keep the label to a word or two, and the caption to one short line, so two fit side by side."
      ],
      "avoid": [
        {
          "when": "For a number that matters on its own, such as penalty points",
          "instead": {
            "text": "govuk-app-count",
            "element": "govuk-app-count"
          }
        },
        {
          "when": "For a fact with no state, such as a vehicle's fuel",
          "instead": {
            "text": "govuk-app-labelled-icon",
            "element": "govuk-app-labelled-icon"
          }
        },
        {
          "when": "For a state that needs attention, at the top of its card",
          "instead": {
            "text": "govuk-app-card-header",
            "element": "govuk-app-card-header"
          }
        }
      ],
      "examples": [
        {
          "name": "Valid",
          "html": "<govuk-app-status label=\"Tax\" caption=\"Valid\"></govuk-app-status>"
        },
        {
          "name": "Expired",
          "html": "<govuk-app-status state=\"expired\" label=\"MOT\" caption=\"Expired\"></govuk-app-status>"
        }
      ],
      "script": "src/components/status/status.js",
      "card": "components/status.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/status/"
    },
    {
      "name": "Strong",
      "element": "govuk-app-strong",
      "slug": "strong",
      "kind": "native",
      "inApp": false,
      "proposed": "a screenshot of the future driving designs in Figma, until there’s a link to the file",
      "purpose": "Makes a few words of a line bold, where they say what the rest of it is, such as Expired before a date, or 1 year 28 days before remaining.",
      "attributes": {},
      "content": "The words to make bold. Put it inside a <govuk-app-text>, around the words, and it takes that text's size and colour.",
      "contains": {
        "text": true
      },
      "rules": [
        "Bold only the words that say what the rest of the line is, such as Expired before a date.",
        "For a whole line in bold, give the text emphasis instead. For a heading, use the heading.",
        "Use it once in a line at most: more, and nothing stands out."
      ],
      "avoid": [
        {
          "when": "For a whole line in bold",
          "instead": {
            "text": "govuk-app-text emphasis",
            "element": "govuk-app-text",
            "attributes": {
              "emphasis": true
            }
          }
        },
        {
          "when": "For a heading",
          "instead": {
            "text": "govuk-app-heading",
            "element": "govuk-app-heading"
          }
        },
        {
          "when": "For words that go somewhere",
          "instead": {
            "text": "govuk-app-link",
            "element": "govuk-app-link"
          }
        }
      ],
      "examples": [
        {
          "name": "A status before a date",
          "html": "<govuk-app-text size=\"subheadline\"><govuk-app-strong>Expired</govuk-app-strong> 28 March 2026</govuk-app-text>"
        },
        {
          "name": "A time left",
          "html": "<govuk-app-text><govuk-app-strong>1 year 28 days</govuk-app-strong> remaining</govuk-app-text>"
        }
      ],
      "script": "src/components/strong/strong.js",
      "card": "components/strong.md",
      "url": "https://alphagov.github.io/govuk-mobile-prototype-components/components/strong/"
    }
  ]
}
