Skip to content

Chip Component

A chip component.

Properties

NameTypeDefaultDescription
disabledbooleanfalseWhether the chip is disabled.
selectedbooleanfalseWhether the chip is selected.
size'sm' | 'md''md'The size of the chip.
hasIconbooleanfalseWhether the chip has icon.

Slots

NameDescription
defaultDefault content slot for chip text.
iconSlot for an optional icon.

CSS Parts

NameDescription
chipThe button element representing the chip.

Check this link to learn how to use CSS parts for Chip Component.

CSS Properties

TokenDefaultDescription
--tap-font-family--tap-sys-font-familyThe font family used in the chip.
--tap-chip-font-size--tap-sys-typography-body-sm-sizeThe font size for the chip's content.
--tap-chip-line-height--tap-sys-typography-body-sm-heightThe line height for the chip's content.
--tap-chip-border-radius--tap-sys-radius-fullThe border radius for the chip.
--tap-chip-border-color--tap-sys-color-border-primaryThe border color of the chip.
--tap-chip-background-color--tap-sys-color-surface-primaryThe background color of the chip.
--tap-chip-color--tap-sys-color-content-primaryThe text color of the chip.
--tap-chip-horizontal-padding--tap-sys-spacing-4The horizontal padding inside the chip.
--tap-chip-min-width72pxThe minimum width of the chip.
--tap-chip-icon-gap--tap-sys-spacing-4The gap of the icon slot in the chip.
--tap-chip-selected-background-color--tap-sys-color-surface-secondaryThe background color of a selected chip.
--tap-chip-selected-border-color--tap-sys-color-surface-inverse-primaryThe border color of a selected chip.
--tap-chip-disabled-color--tap-sys-color-content-disabledThe text color of a disabled chip.
--tap-chip-selected-and-disabled-color--tap-sys-color-border-primaryThe border color of a selected and disabled chip.
--tap-chip-group-sm-height--tap-sys-spacing-9The height of the chip in small size.
--tap-chip-group-md-height--tap-sys-spacing-10The height of the chip in medium size.