Form input example

Numeric input

If input is set to type="number" we set the component up as described in the GOV.UK Design System guidance adding inputmode and pattern. These values can be overridden if necessary.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/input", {
  label: {
    text: "Account number"
  },
  name: "account-number",
  type: "number"
} %>