1. Collections Component Guide
  2. Form input
  3. With maxlength
Form input example

With maxlength

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/input", {
  label: {
    text: "An input that doesn't allow many characters"
  },
  name: "name",
  value: "You can't type more",
  maxlength: 10
} %>