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

Support minCount in TextArea component #1928

Open
mrbrianevans opened this issue Mar 7, 2024 · 1 comment
Open

Support minCount in TextArea component #1928

mrbrianevans opened this issue Mar 7, 2024 · 1 comment
Labels
flagship Question for @carbon-design-system/carbon type: enhancement 💡

Comments

@mrbrianevans
Copy link

Request for TextArea component minCount prop

Currently there is a maxCount prop on the TextArea component that limits the number of allowed characters to be below a certain number.

https://svelte.carbondesignsystem.com/components/TextArea#maximum-character-count

For different use cases, it would be very useful to be able to specify a minCount, that requires the user to type a minimum number of characters, also showing the character count as maxCount does.

If the length of input is below minCount it should put the component in an invalid state and indicate that more characters are required.

This could be implemented by users of the library if there was a prop showCharacterCount or similar, that didn't put a restriction on maxCount but shows the character count in the top right.

image

@theetrain
Copy link
Collaborator

Seeing that the core React library doesn't have a minCount prop, this requires upstream designs. I recommend opening a ticket in https://github.com/carbon-design-system/carbon/issues to kick off this functionality.

@theetrain theetrain added flagship Question for @carbon-design-system/carbon type: enhancement 💡 labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flagship Question for @carbon-design-system/carbon type: enhancement 💡
Projects
None yet
Development

No branches or pull requests

2 participants