1. Collections Component Guide
  2. Form character count
  3. With id for textarea
Form character count example

With id for textarea

How it looks (preview)

You can enter up to 10 characters

How to call this example

<%= render "govuk_publishing_components/components/character_count", {
  textarea: {
    label: {
      text: "What is your quest?"
    },
    name: "with-an-id"
  },
  id: "custom-id",
  maxlength: 10
} %>