Skip to content

Chip - CSS Component

Playground

Construction

The CSS component uses a <button> or <output> tag with the z-chip HTML custom attribute.

z-chip

The z-chip attribute is the main attribute used to implement the styling to the chip component.

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

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

disabled

The attribute disabled will block the interaction with the component.

INFO

If the z-chip attribute it's set to an <output> tag, the component will behave as a readonly component.

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

HTML Examples

CodeSandbox example