Skip to content

Pills Input

Pills input allows users to enter multiple items, such as tags or email addresses, into a single input field.

Usage

Pill Input is a control that lets users enter text, transforming each entry into a distinct "pill". A new entry is added when the Enter key is pressed or when separated by commas or semicolons. Existing pills can be deleted as needed.

Pills input

When to use

  • To add tags to categorize content, making it easier for users to classify and find items based on keywords.
  • To enter email addresses or names, allowing users to easily add or remove recipients.
  • For selecting multiple options from a wide range of choices.

Best practices for pills input

  • Guide users with examples in the placeholder, like "Enter tags, separated by commas."
  • If needed, set a maximum number of pills to keep the interface clean.
  • Offer autocomplete suggestions as required.
  • Provide validation when necessary.

Except where otherwise noted, content on this site is licensed under MIT License.