Pills represent a set of one or multiple objects which can be entered or changed by the user. By default, pills can be removed by the user. When necessary, the order of pills can be changed by the user using drag and drop. They are used to represent complex entities in small blocks such as contact details. Contentful Pills are are used to render transition locales and tag elements.
Table of contents
How to use Pill
- use Pill to represent data like contact details or tagging
- it can be used for web content that needs to be labeled, categorized, or organized using keywords that describe them.
Example of usage with draggable option
Example of the Pill component with dragHandle, in that case Icon.
- Be sure the pill text is clear and concise.
- Label value is passed in the component as a aria-label and title in the span element, like follows