Skip to content

Slider - Web Component

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

Parameters

The Web component uses the <z-slider> 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
labelstringThe label of the slider
disabledbooleanBlocks the interaction with the input component.
requiredbooleanMarks the input component as required.
namestringIdentification for the field inside the form
rangenumber[]The range of the slider
icon-rightstringThe icon to show on the right side of the slider
icon-leftstringThe icon to show on the left side of the slider
show-maxbooleanWhether to show the maximum value of the slider
show-minbooleanWhether to show the minimum value of the slider

The events emitted from the component are:

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

label

The label parameter is used to set the label of the slider.

value

The value parameter is used to set the value of the slider. Make sure the value is within the range.

disabled

The disabled parameter is used to block the interaction with the slider, and it will not be possible to change the value.

required

The required parameter is used to make the slider required.

name

The name parameter is used to set the name of the slider. This name will be used when submitting the form.

range

The range parameter is used to set the range of the slider. The range must be an array with two values, the first value is the minimum value, and the second value is the maximum value.

icon-right

The icon-right parameter is used to set an icon on the right side of the slider. Use the icon name from the Icon component.

icon-left

Same as icon-right, but the icon will be on the left side of the slider.

show-max

The show-max parameter is used to show the maximum value of the slider.

show-min

The show-min parameter is used to show the minimum value of the slider.

Playground

Customization

HTML Examples

StackBlitz example