Back to Component Browser

Chip

Quartz

lib/quartz/components/Chip/index.ts

Preview
DefaultTealPurpleSmall

Import

import { Chip } from '@/lib/quartz';

Props (10)

NameTypeRequiredDefaultDescription
idstringoptional—The id of the text element
labelstringrequired—The text to display inside the Chip
backgroundColorenumrequired—The background color to apply to the Chip. While "white" and "lightGray" are similar, they look different against colored backgrounds...
startSlotReactNodeoptional—A slot to center align another piece of content before the Chip contents. Typically an SVG icon rendered as a react component.
endSlotReactNodeoptional—A slot to center align another piece of content after the Chip contents. Typically an SVG icon rendered as a react component.
sizeenumoptionalsmallThe size of the Chip.
slotSizeenumoptionalsmallThe size of the slot. Defaults to the size of the Chip.
startSlotGapenumoptionalsmallThe size of the gap between the start slot and the border of the Chip.
asenumoptionalspanTag name for the Chip.
onClick() => voidoptional—Optional click handler for when Chip is a button.

Usage

Not used in any projects yet.