Skip to content

Chip

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

Parameters

The Web component uses the <z-chip> tag:

By default, all the parameters are optional or can be set in different, except for the ones marked as required

The parametrization of the component can be done with the following custom HTML params:

NameTypeDescriptionSlot
contentstringThe text to be displayed in the chip.default
disabledbooleanBlocks the interaction with the component.
readonlybooleanTransforms the chip into an output.

The events emitted from the component are:

NamePayloadDescription
clickMouseEvent

The z-chip receives a click event that can be used to trigger some action when the chip is clicked.

The available slots for the component are:

NameTagsDescription
defaultspanContent of the chip.

disabled

The attribute disabled will block the interaction with the component

Disabled chip

readonly

The attribute readonly will make the component to behave as a readonly component.

Readonly chip

Both background and text color can be customized using the --z-chip--bg and --z-chip--color CSS custom properties respectively.

Custom chip

Also, the hover state can be customized using the --z-chip--bg--hover and --z-chip--color--hover CSS custom properties.

Custom chip

Playground

Customization

HTML Examples

StackBlitz example