Skip to main content
5.0.3Next5.0.35.0.25.0.15.0.04.0.94.0.84.0.73.2.03.1.03.0.13.0.02.1.12.0.101.0.0
Version: 5.0.3

Progress

The Progress component, also known as a progress bar, is used to visualize a value, compared to it's minimum and maximum. There are several variations of progress elements: the default progress bar, the circular progress, and the gauge. TritonProgress examples of use include: displaying fuel left in a tank, showing how many tasks are completed, and showing context for a KPI.

Basic Usage

<triton-progress 
max="20" value="5"
></triton-progress>
<TritonBadge 
max="20" value="5"
/>
<html> 
<head>
<script type="module">
import { defineCustomElements } from '~node_modules/@kognifai/triton-cl-core/loader/index.es2017.js';
defineCustomElements();
</script>
</head>
<body>
<triton-progress
max="20" value="5"
></triton-progress>
</body>
</html>

Variants

Progress Bar

The default variant is the Progress Bar. Progress will display a line based on the percentage of the value min -> max. By default, a tooltip will be added to the top of the bar with the value. This is shown in the basic example above.

Circular Progress Indicator

The circular progress indicator displays a progress circle from min to max, where starting point is on the bottom of the circle. Set the property shape to "circle" to enable circular progress.

<triton-progress max="20" value="10" shape="circle"></triton-progress>

Dashboard Progress Indicator

The dashboard progress indicator displays a progress gauge in an arch. Set the shape property to "dashboard" to enable the Dashboard mode. Text can also be used inside the dashboard progress element.

<triton-progress max="20" value="10" shape="dashboard"></triton-progress>

Appearance

There are several properties for customizing the appearance of the Triton Progress:

  • showPercent shows a percentage of progress instead of actual values
  • labels is shown by default, but can be disabled
  • tooltip is shown by default, but can be disabled as well

Percentage

<triton-progress max="20" value="16" showPercent></triton-progress>
<triton-progress shape="circle" max="20" value="12" showPercent></triton-progress>
<triton-progress shape="dashboard" max="20" value="12" showPercent></triton-progress>

Removing Labels

The labels can be removed by setting the labels property to false.

<triton-progress max="20" value="9" labels="false"></triton-progress>
<triton-progress shape="circle" max="20" value="9" labels="false"></triton-progress>
<triton-progress shape="dashboard" max="20" value="9" labels="false"></triton-progress>

Removing tooltip

The tooltip can be removed by setting the tooltip property to false.

<triton-progress max="20" value="9" tooltip="false"></triton-progress>
<triton-progress shape="circle" max="20" value="9" tooltip="false"></triton-progress>
<triton-progress shape="dashboard" max="20" value="9" tooltip="false"></triton-progress>

Playground

API

Properties

PropertyDescriptionTypeDefault
colorSet color of the bar, require valid css color. If empty, theme default will be usedstring-
disabledIf true, the component will look disabled and not be interactablebooleanfalse
glowGlow effect on progress barbooleanfalse
labelsIf true, it will show minmax labels on both sides of the progress elementbooleantrue
maxMax value for the progress barnumber100
minMinimum value for the progress barnumber0
no-labelsIf true, will show minmax labels on either side of the bar Deprecationbooleanfalse
no-tooltipIf true, will show value tool tip Deprecationbooleanfalse
shapeSelect the type of the progress barcircle dashboard lineTritonProgressShape.Line
show-percentIf true, will show progress as percentagebooleanfalse
sizeSet the size of the componentbase body large medium small tiny xlarge xxlarge xxxlarge'body'
tooltipIf true, it will show a tooltip with the current valuebooleantrue
valueValue of the progress in the barnumber0

Slots

Main

Takes any kind of markup element.

<triton-progress>
<div></div>
</triton-progress>