Chip
On this page
Style
A chip is a checkbox HTML input element. It is styled as text on a pill-shaped background. A close icon appears on the right when a chip is selected. Chips are commonly arranged horizontally in chip groups where a legend or text label is included at the beginning.
Anatomy
- Chip group
- Legend
- Chip text
- Selected icon
- Clear all button
Variants
Style
Each chip state has unique styling based on its function.
Size
There are two available chip sizes: Small and Large. The only difference is the text size. Chip groups also have two legend sizes depending on which chip is used.
Color scheme
Chips and chip groups are available in both light and dark color schemes.
Light scheme
Dark scheme
Space
The space in each chip is the same for both sizes. The --rh-space-md
token is used after the legend as well as in between each subsequent chip.
The --rh-space-lg
token is used when chips are stacked.
Interaction states
Hover
Styles will change on hover depending on how a chip is used.
- The Default and Selected chip borders change to
--rh-border-width-md
on hover - The Clear all chip border becomes visible and is
--rh-border-width-sm
on hover - A disabled chip has no states
Focus and Active
A focus ring wraps around the text and icon in both focus and active states. Hover state styles remain the same.
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.