Ready

Pill

Pills are interactive elements that are displayed dynamically based on user inputs. Pills should make it easier for the users to interact with and manipulate Basis content and data.

Ready

Pill

Pills are interactive elements that are displayed dynamically based on user inputs. Pills should make it easier for the users to interact with and manipulate Basis content and data.

Ready

Pill

Pills are interactive elements that are displayed dynamically based on user inputs. Pills should make it easier for the users to interact with and manipulate Basis content and data.

Anatomy

  1. Pill Text

  2. Dropdown Icon

  3. Dismiss Control

Variants

  1. Default

  2. Deletable

  3. Dropdown

States

  1. Default

  2. Dropdown: Hover

  3. Delete: Hover

  4. Disabled

Best Practices

1. Clear

Pills should clearly represent the user input that generated them. If the input contains text, that text should be used in the pill.

2. Concise

Pill text should be concise. Pill text should be short and easy to scan

3. Multiple pills

Multiple pills should display in-line. Pills should be separated with 1 core unit See Spacing for unit values.

4. Delete a Pill

The "Pill-delete" setting gives the user the ability to remove the pill. When a pill is removed, the other pill should shift to the left to fill the space.

More

Related Pages

Accessibility

Color contrast ratio for our Pill components meets AA standards, based on Web Content Accessibility Guidelines (WCAG) guidelines.

  1. Benefits: People with low vision often have difficulty reading text that does not contrast with its background. This can be exacerbated if the person has a color vision deficiency that lowers the contrast even further. Providing a minimum luminance contrast ratio between the text and its background can make the text more readable even if the person does not see the full range of colors. It also works for the rare individuals who see no color.¹

  2. The user should only be able to focus on 1 focused pill per set of pills

  3. The remove button should not be focusable, but should be clickable

  4. The remove button should have a hover state

  5. The user should be able to delete a pill with a keyboard using the Backspace or Delete key when focused on a pill

  6. Pills should have a title tags

Additional Reading

  1. “Web Content Accessibility Guidelines (WCAG) 2.0.” W3C, www.w3.org/TR/WCAG20/.

  2. Tagging Design Pattern https://ui-patterns.com/patterns/Tag

© 2024 Basis Technologies
© 2024 Basis Technologies
© 2024 Basis Technologies