Skip to main content

Chip

shadow

The Chip component is a universal element that is a small visual block containing various other elements such as avatars, text and icons. It offers options to customize colors, states and more.

Basic use

Inserting other elements

It is also possible to display other elements in the chip element, for example avatar, label and icon elements.

Styling

Color variants

Styling with CSS custom properties

Attributes and Properties

active

DescriptionIf true, the chip is active and displays a check icon.
Attributeactive
Typeboolean
Defaultfalse

color

DescriptionChip colour. Default options include primary, complete, success, warning, danger, info and default.
Attributecolor
Type"primary." | "complete" | "success" | "warning" | "danger" | "info" | "default" | string
Defaultundefined

disabled

DescriptionIf true, the chip is deactivated and cannot be interacted with.
Attributedisabled
Typeboolean
Defaultfalse

removable

DescriptionIf true, the chip can be removed by clicking the remove button.
Attributeremovable
Typeboolean
Defaultfalse

Events

NameDescription
wje:chip-removeIssued when the chip is removed.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeRefers to the native wrapper element of the chip.
removeButton to remove the chip.

CSS Custom Properties

NameDescription
--wje-chip-border-radiusRounding the edges of the chip.
--wje-chip-background-colorChip background colour.
--wje-chip-colorChip text colour.
--wje-chip-paddingInternal chip offset.

Slots

NameDescription
``The main content of the chip.
endSlot for additional content at the end of the chip.