Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionAlertCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Chip

OverviewStyleGuidelinesCodeAccessibilityDemos
ImportingUsageImporting chip vs. chip grouprh-chiprh-chip-groupImportingUsageImporting chip vs. chip grouprh-chiprh-chip-group

Importing

Add rh-chip to your page with this import statement:

<script type="module">
  import '@rhds/elements/rh-chip/rh-chip.js';
</script>
Copy to Clipboard Wrap lines

To learn more about installing RHDS elements on your site using an import map read our getting started docs.

Usage

<rh-chip>Chip</rh-chip>

<script type="module">
  import '@rhds/elements/rh-chip/rh-chip.js';
</script>
Copy to Clipboard Wrap lines

Importing chip vs. chip group

If using <rh-chip-group>, change the import from rh-chip.js to rh-chip-group.js:

- import '@rhds/elements/rh-chip/rh-chip.js';
+ import '@rhds/elements/rh-chip/rh-chip-group.js';

Users can import rh-chip-group.js to gain access to both elements. If you're only using chip, save some bytes by only importing rh-chip.js.

rh-chip

A chip provides a toggle for filtering content or indicating a selection when users choose from categories. Each chip must contain short inline text and may be placed in an rh-chip-group of related chips. The hidden checkbox allows form participation and provides screen reader accessibility. Keyboard users press Tab to navigate between chips and use Enter or Space to toggle.

Slots 1

Slot Name Summary Description
[default]

Chip label

Expects short inline text for the chip label. Should not contain block elements or interactive content.
Note: [default] unnamed slots do not have a slot="name" attribute.

Attributes 3

Attribute DOM Property Description Type Default
checked checked

Whether the chip is checked.

boolean
false
disabled disabled

Whether the chip is disabled.

boolean
false
value value

Set a custom string for the input's value attribute. Defaults to on.

string
unknown

Methods 0

None

Events 1

Event Name Description
change

Fires when the chip is checked or unchecked. The event's checked property (boolean) holds the chip's state before the change. Cancelable — canceling prevents the state change.

CSS Shadow Parts 1

Part Name Summary Description
chip

The outer <label> container for the chip, styled with the --rh-border-radius-pill token.

CSS Custom Properties 0

None

Design Tokens 23

Token Description Copy
--rh-space-lg

Chip label block end margin

16px spacer

Full CSS Variable Permalink to this token
--rh-font-family-body-text

Chip body text font family

Body text font family

Full CSS Variable Permalink to this token
--rh-line-height-body-text

Chip body text line height

Line height for body text

Full CSS Variable Permalink to this token
--rh-border-radius-pill

Chip pill border radius

Pill border radius; Example: Label

Full CSS Variable Permalink to this token
--rh-border-width-sm

Chip outline width

1px border width; Example: Secondary CTA or Button

Full CSS Variable Permalink to this token
--rh-color-border-subtle

Chip outline color

Full CSS Variable Permalink to this token
--rh-space-xs

Chip block padding

4px spacer

Full CSS Variable Permalink to this token
--rh-font-size-body-text-sm

Chip label font size

14px font size

Full CSS Variable Permalink to this token
--rh-font-size-body-text-xs

Small size chip label font size

12px font size

Full CSS Variable Permalink to this token
--rh-border-radius-default

Focus ring border radius

3px border radius; Example: Card

Full CSS Variable Permalink to this token
--rh-length-3xs

Focus ring block inset

2px length token

Full CSS Variable Permalink to this token
--rh-length-md

Focus ring inline inset

8px length token

Full CSS Variable Permalink to this token
--rh-border-width-md

Chip hover/focus outline width

Focus ring outline width

2px border width: Example: Alert

Full CSS Variable Permalink to this token
--rh-color-border-interactive

Focus ring outline color

Full CSS Variable Permalink to this token
--rh-color-text-secondary

Disabled chip text color in light mode

Full CSS Variable Permalink to this token
--rh-color-gray-40

Disabled chip text color in dark mode

Subtle icon (hover state)

Full CSS Variable Permalink to this token
--rh-color-gray-30

Disabled chip background in light mode

Disabled chip outline in light mode

Subtle borders (light theme)

Full CSS Variable Permalink to this token
--rh-color-surface-dark

Disabled chip background in dark mode

Disabled chip outline in dark mode

Tertiary surface (dark theme)

Full CSS Variable Permalink to this token
--rh-color-blue-70

Checked chip background in dark mode

Checked chip text color in light mode

Alert - Info title text

Full CSS Variable Permalink to this token
--rh-color-blue-10

Checked chip background in light mode

Checked chip text color in dark mode

Alert - Info background

Full CSS Variable Permalink to this token
--rh-color-blue-30

Checked chip outline in light mode

Checked chip hover outline in light mode

Inline link (dark theme)

Full CSS Variable Permalink to this token
--rh-color-blue-50

Checked chip outline in dark mode

Checked chip hover outline in dark mode

Label - Filled (Blue) accent color

Full CSS Variable Permalink to this token
--rh-space-md

Chip inline end spacing

Chip inline padding

Close icon inline start spacing

8px spacer

Full CSS Variable Permalink to this token

rh-chip-group

A chip group provides a <fieldset> container for related rh-chip elements. It renders a <legend> for screen reader accessibility. Authors must provide an accessible label when "Filter by:" is not appropriate. Authors should avoid placing non-chip elements in the default slot. Users may press Tab to navigate between chips.

Slots 3

Slot Name Summary Description
accessible-label

Accessible label for the chip group

Inline text for the chip group legend. Content is placed into the <legend> element for screen reader accessibility. Authors must ensure the label is descriptive for assistive technology. Also available as the accessible-label attribute.

[default]

Default slot for chip elements

Expects rh-chip elements. Place individual chips inside rh-chip-group to group them as a fieldset. Each chip must have a unique text label for screen readers.
Note: [default] unnamed slots do not have a slot="name" attribute.

clear-all

Clear all button label

Inline text to customize the "Clear all" button label. Defaults to "Clear all". Should be localized for non-English contexts.

Attributes 2

Attribute DOM Property Description Type Default
size size

Decreases the font-size of the chip's label

'sm'
unknown
accessible-label accessibleLabel

The accessible label for the form control / rh-chip-group

string
unknown

Methods 1

Method Name Description
firstUpdated()

Events 0

None

CSS Shadow Parts 1

Part Name Summary Description
legend

The <legend> element containing the accessible label, styled with --rh-font-size-body-text-md.

CSS Custom Properties 0

None

Design Tokens 18

Token Description Copy
--rh-space-lg

Chip group margin block spacing

16px spacer

Full CSS Variable Permalink to this token
--rh-font-size-body-text-md

Legend font size

16px font size

Full CSS Variable Permalink to this token
--rh-border-radius-pill

Clear all button border radius

Pill border radius; Example: Label

Full CSS Variable Permalink to this token
--rh-color-interactive-primary-default

Clear all button text color

Full CSS Variable Permalink to this token
--rh-font-family-body-text

Legend body text font family

Clear all button font family

Body text font family

Full CSS Variable Permalink to this token
--rh-line-height-body-text

Clear all button line height

Line height for body text

Full CSS Variable Permalink to this token
--rh-border-width-sm

Clear all button outline width

1px border width; Example: Secondary CTA or Button

Full CSS Variable Permalink to this token
--rh-space-xs

Clear all button block padding

4px spacer

Full CSS Variable Permalink to this token
--rh-space-md

Legend inline end spacing

Clear all button inline padding

8px spacer

Full CSS Variable Permalink to this token
--rh-color-interactive-primary-hover

Clear all button hover/focus text color

Full CSS Variable Permalink to this token
--rh-color-border-subtle

Clear all button hover/focus outline color

Full CSS Variable Permalink to this token
--rh-border-radius-default

Focus ring border radius

3px border radius; Example: Card

Full CSS Variable Permalink to this token
--rh-length-4xs

Focus ring block inset

1px length token

Full CSS Variable Permalink to this token
--rh-length-md

Focus ring inline inset

8px length token

Full CSS Variable Permalink to this token
--rh-border-width-md

Clear all button focus outline offset

Focus ring outline width

2px border width: Example: Alert

Full CSS Variable Permalink to this token
--rh-color-border-interactive

Focus ring outline color

Full CSS Variable Permalink to this token
--rh-font-size-body-text-sm

Clear all button font size

Legend font size at small size

14px font size

Full CSS Variable Permalink to this token
--rh-font-size-body-text-xs

Clear all button font size at small size

12px font size

Full CSS Variable Permalink to this token
© 2026 Red Hat Deploys by Netlify