Skip to content

Segmented control - Web Component

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

Parameters

The Web component uses the <z-segmented-control> 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[]Array of options to be displayed
namestringName of the input
disabledbooleanBlocks user interaction with the component

The events emitted from the component are:

NamePayloadDescription
changestringReturns the new value of the "value" attribute
restartedvoidEmitted on value reset

options

The options parameter is used to set the options of the segmented control. Each option object should contain the text and value keys, also the disabled key is optional.

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

name

The name parameter is used to set the name of the segmented control.

disabled

The disabled parameter is used to block the interaction with the component.

Playground

Customization

HTML Examples

StackBlitz example