General purpose component to track progress
<tk-progress-bar label="Uploading video" value="32"></tk-progress-bar>
Use the value
prop to indicate progress. Default scale 0 - 100. See max
prop to set a different scale.
<tk-progress-bar label="Uploading video" value="12" size="small"></tk-progress-bar>
Use the size
prop to render the small variant.
<tk-progress-bar label="Uploading video" value="12" size="large"></tk-progress-bar>
Use the size
prop to render the large variant.
<tk-progress-bar label="Uploading video" steps="5" active-step="1"></tk-progress-bar>
<hr />
<tk-progress-bar label="Uploading video" steps="6" active-step="2" size="large"></tk-progress-bar>
Use the steps
prop to divide the progress bar into a number of steps. Use together with the optional active-step
to indicate progression.
<tk-progress-bar label="Uploading video" value="4" max="8"></tk-progress-bar>
Use the max
prop to render a scale different from the default. (0 - 100)
<tk-progress-bar label="Uploading video" is-responsive="true" value="12"></tk-progress-bar>
<hr />
<tk-progress-bar label="Uploading video" is-responsive="false" value="12" size="large"></tk-progress-bar>
Use the isResponsive
prop to render (true
) or not (false
) the circular variant on small screens.
<tk-progress-bar label="Uploading video" variant="circular" value="32"></tk-progress-bar>
<tk-progress-bar label="Uploading video" variant="circular" value="12" size="large"></tk-progress-bar>
<tk-progress-bar
variant="circular"
size="large"
label="Uploading video"
steps="6"
active-step="2"
></tk-progress-bar>
<tk-progress-bar label="Uploading video" variant="circular" value="4" max="8"></tk-progress-bar>
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
activeStep |
active-step |
Current step the progress bar is on. Use this together with the steps prop to define how many total steps exist. |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
undefined |
isResponsive |
is-responsive |
When true this will render the circular variant for smaller viewports. | boolean |
true |
label |
label |
Progress bar elements must have discernible text that clearly describes the destination, purpose, function, or action for screen reader users. | string |
undefined |
max |
max |
The value when the progress bar is full / complete. For use-cases where a value of 100 does not represent a completed process. |
number |
100 |
size |
size |
Size (height) of the progress bar | "large" | "medium" | "small" |
"medium" |
steps |
steps |
Amount of steps the progress bar needs to be divided into. Maximum of 8. | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
MIN_STEPS_COUNT |
value |
value |
Pass a value to fill the progress bar to. Automatically calculated for a stepped progress bar. | number |
0 |
variant |
variant |
Specifies which variant to render. | "circular" | "horizontal" |
"horizontal" |
returnValue() => Promise<number>
Type: Promise<number>