Sha256: 4549e070af36b5f18fd31c8faf7e482c0a41a4fe9199b7d446658299f8d01b2f

Contents?: true

Size: 1.76 KB

Versions: 415

Compression:

Stored size: 1.76 KB

Contents

name: Form character count
description: Help users enter text when there is a limit on the number of characters they can type
govuk_frontend_components:
  - character-count
accessibility_criteria: |
  The component must:

  - accept focus
  - be focusable with a keyboard
  - be usable with a keyboard
  - be usable with touch
  - indicate when they have focus
  - be recognisable as form textarea elements
  - have correctly associated labels
  - inform the user about the character limit
  - inform the user as the number of left characters changes

  Labels use the [label component](/component-guide/label).
examples:
  default:
    data:
      textarea:
        label:
          text: "Can you provide more detail?"
        name: "more-detail"
      maxlength: 10
  with_hint:
    data:
      textarea:
        label:
          text: "Can you provide more detail?"
        name: "with-hint"
        hint: "Please include as much information as possible."
      maxlength: 10
  with_id_for_textarea:
    data:
      textarea:
        label:
          text: "What is your quest?"
        name: "with-an-id"
      id: "custom-id"
      maxlength: 10
  with_error:
    data:
      textarea:
        label:
          text: "Can you provide more detail?"
        name: "more-detail-error"
        error_message: "Detail must be 10 characters or less"
        value: |
          221B Baker Street
          London
          NW1 6XE
      maxlength: 10
  with_word_count:
    data:
      textarea:
        label:
          text: "Can you provide more detail?"
        name: "more-detail-value"
      maxwords: 10
  with_threshold:
    data:
      textarea:
        label:
          text: "Can you provide more detail?"
        name: "more-detail-with-threshold"
      threshold: 75
      maxlength: 20

Version data entries

415 entries across 415 versions & 1 rubygems

Version Path
govuk_publishing_components-51.2.1 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-51.2.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-51.1.1 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-51.1.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-51.0.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-50.0.1 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-50.0.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-49.1.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-49.0.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-48.0.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-47.0.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-46.3.1 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-46.3.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-46.2.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-46.1.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-46.0.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-45.10.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-45.9.0 app/views/govuk_publishing_components/components/docs/character_count.yml
govuk_publishing_components-45.8.0 app/views/govuk_publishing_components/components/docs/character_count.yml