-
Notifications
You must be signed in to change notification settings - Fork 78
Restricting user input
JC Franco edited this page Feb 4, 2025
·
8 revisions
Restricting user input outside of native form control contexts can lead to unexpected behavior and isn’t always necessary. To provide greater flexibility, we leave it up to developers to prevent input when needed, allowing for more control over specific use cases.
- Handling of data pasted, autofilled by browser extension or populated by a database
- data would be stripped without user knowledge
- Assuming user text workflows – related to 1, but some users might be working with an existing piece of text that can be edited down to the desired input
- When component adheres to native form control + max-length constraints
- When input is restricted to a deterministic range of values (e.g., hex color characters)