Skip to content

Progress tracker - Web Component โ€‹

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

Parameters โ€‹

The Web component uses the <z-progress-tracker> tag:

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

NameTypeDescription
stepsobject[]Steps of the progress tracker
config
(optional)
stringConfiguration of the progress tracker
value
(optional)
numberCurrent step. Between 1 and 10
name
(optional)
stringName of the input

steps โ€‹

The steps attribute recieve an array of objects with the following properties:

  • text: Small description of the step.
  • icon: Icon to be displayed on the step.

Both properties are optional.


config โ€‹

The config parameter is used to define the orientation and the size of the component.

vertical / horizontal โ€‹

The first modifier defines de orientation of the component. The default value is vertical. Possible values are: vertical or horizontal.


small โ€‹

The second modifier defines the size of the component. By adding small value after the orientation, the component will be smaller.

value โ€‹

The value parameter is used to set the current step of the progress tracker.

name โ€‹

The name parameter is used to set the name of the component.

Playground โ€‹

Customization โ€‹

HTML Examples โ€‹

Imports
html
<link rel="stylesheet" href="/0.4.5/@zurich/web-components/styles.css" />
<script type="module" src="/0.4.5/@zurich/web-components/progress-tracker.js"></script>
Code
html
<z-progress-tracker steps='[{"text":"Step 1"},{"text":"Step 2"},{"text":"Step 3"},{"text":"Step 4"}]' value="3"
  config="horizontal"></z-progress-tracker>