Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create a character counter on the input field #1399

Closed
wants to merge 1 commit into from

Conversation

taraculpin
Copy link
Contributor

Description

Adds an optional character counter to the input field with a configurable element determining after how many entered characters it appears.

Requirements

  • maxlength and characterCounterTrigger attributes need to be set on the input for the character counter to appear.
    • If the maxlength and characterCounterTrigger attributes are the same, then the character counter will display before any value has been entered
    • If the characterCounterTrigger is 5 for example, the character counter will display when there are only 5 characters remaining. If the maxlength were set to 20, the character counter would display after 15 characters had been entered.

Design link: (link to design or delete if not required) - TBC
Screenshot: image

Checklist:

  • The commit messages follow the convention for this project
  • I have provided an adequate amount of test coverage
  • I have added the functionality to the test app
  • I have provided a story in storybook to document the changes
  • I have added the documentation
  • I have added any new public feature modules to public-api.ts

@taraculpin taraculpin closed this May 9, 2024
@taraculpin taraculpin deleted the character-counter branch May 9, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant