Ir al contenido

co-chip

Ver código
<co-chip label="Activo" color="success"></co-chip>
<co-chip label="Pendiente" color="warning" removable></co-chip>
<co-chip label="Cerrado" color="error"></co-chip>

Props

PropAtributoTipoDefaultDescripción
clickableclickablebooleanfalseMake the chip clickable (emits coClick)
colorcolor"default" | "error" | "info" | "primary" | "success" | "warning"'default'Semantic color
disableddisabledbooleanfalseDisabled state
iconLefticon-leftstring | undefinedIcon name for the left icon (prop-based, uses co-icon — any Phosphor icon name)
iconModeicon-mode"both" | "left" | "none"'none'Icon mode (for slot-based icons): - none = no icon slots - left = icon before label (Figma "1nd Icon") - both = icon before + icon after (Figma "2nd Icon")
iconRighticon-rightstring | undefinedIcon name for the right icon (prop-based, uses co-icon — any Phosphor icon name)
iconWeighticon-weight"bold" | "duotone" | "fill" | "light" | "regular" | "thin"'regular'Icon weight applied to prop-based iconLeft / iconRight.
labellabelstring | undefinedText label (alternative to default slot)
removableremovablebooleanfalseShow dismiss/remove button and emit coRemove on click
selectedselectedbooleanfalseSelected / active state
shapeshape"rounded" | "square"'rounded'Shape: pill or straight corners
sizesize"large" | "small"'large'Size: large (12px text), small (10px text)
variantvariant"filled" | "outlined"'filled'Visual variant

Eventos

EventoDetailBubblesCancelableDescripción
coClickvoidEmitted when the chip body is clicked (only if clickable)
coRemovevoidEmitted when the remove button is clicked

Slots

SlotDescripción
(default)Label text
icon-leftIcon before label (1nd Icon mode)
icon-rightIcon after label (2nd Icon mode)

CSS Parts

PartDescripción
::part(chip)
::part(icon-left)
::part(icon-right)
::part(remove)

CSS Custom Properties

Este componente no expone CSS custom properties.