Skip to content

Chips set - Web Component

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

Parameters

The Web component uses the <z-chips-set> 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
optionsobject[]List of options for the chips
configstringConfiguration of the chip set
valuestring[]Value of the selected chips
disabledbooleanDisables the input
readonlybooleanMakes the input read-only
requiredbooleanMakes the input required

The events emitted from the component are:

NamePayloadDescription
changestring[]Returns the new value of the "value" attribute
restartedvoidEmitted on value reset

The available slots for the component are:

NameTagsDescription
defaultspan
option-<opt>span

options

The options attribute is an array of objects that represent the chips. Each object inside the array should have the following properties:

  • text: The text that will be displayed inside the chip.
  • disabled: A boolean that indicates if the chip is disabled.

We can use <option> tags to define the values of options

config

The config attribute is used to set the shape and size of the chip set. It is an object that can have the following properties:

value

The value attribute is an array of strings that represent the selected chips.

disabled

The disabled attribute is a boolean that blocks the user from interacting with the chips.

readonly

The readonly attribute is a boolean that sets the chips to read-only mode.

required

The required attribute is a boolean that sets the chips to required mode.

Slots

Playground

Customization

HTML Examples

StackBlitz example