Skip to content

Restricting user input

Matt Driscoll edited this page Jan 21, 2025 · 4 revisions

tags: [draft, conventions, components, development]

Intercepting and restricting user input is not always desired and can lead to unexpected behavior, so we have been moving away from this approach and leaving it up to developers to prevent input if this is necessary.

Considerations

  1. Handling of data pasted, autofilled by browser extension or populated by a database
  • data would be stripped without user knowledge
  1. 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

Exceptions

  • When input is restricted to a deterministic range of values (e.g., hex color characters)

Related issues