Skip to content

Chip

The chip component presents information in a compact, visually distinct format. It can display text, icons, or both and supports various styles, including outlined, elevated, and text-only appearances.

Example

Basic Chip

The following example demonstrates a simple, outlined chip with default styling. Here, the textcolor property is explicitly set to white, but because the contrast with the background is insufficient, the chip automatically falls back to black text for better readability.

Chip with Icon

This example demonstrates a chip with an icon. By default, if the iconpos property is not specified, the icon is positioned to the left of the label. Here, the chip uses the elevated style and a custom color.

Props

PropertyTypeDefaultDescription
visiblebooleantrueControls the chip's visibility.
positionnumber[]0 0 0Specifies the chip's position.
sizeenum (small, medium, large, extra-large)mediumSpecisies the size of the component.
opacitynumber1Specifies the opacity of the component.
colorstring (blue, #fff)#00BA92Defines the primary color of the chip, affecting elements such as text and background.
modestring (light, dark)""Specifies the color scheme of the chip, supporting either a light or dark mode.
labelstring"Chip"Sets the chip's label text.
textcolorstringblackSpecifies the color of the chip's text. If the contrast with the background is insufficient, the text color will not be applied.
iconstring""Defines the icon to be displayed within the chip. If set, the icon appears alongside the label, with its position controlled by the iconpos property.
iconposstring (left, right)leftDetermines the position of the icon relative to the text. "left" places the icon before the text, while "right" places it after the text.
roundedbooleantrueDetermines whether the chip has rounded edges.
outlinedbooleanfalseWhen enabled, the chip is displayed with an outline instead of a solid background.
elevatedbooleanfalseElevates chip with a shadow.
textonlybooleanfalseRemoves the background and shadow, displaying the chip as plain text.