Progress
#
OverviewProgress is user interface element that indicates the progress of an operation.
#
Examples#
LabelsAdd labels to your progress bars by placing text within progress bar.
- Web Component
- React
- Angular
<uxf-progress progress="25" class="progress-bar" > 25%</uxf-progress>
<UxfProgress progress="25" class="progress-bar" > 25%</UxfProgress>
<uxf-progress progress="25" class="progress-bar" > 25%</uxf-progress>
#
HeightSet a height value on the property height, so if you change that value the inner progress-bar will automatically resize accordingly.
- Web Component
- React
- Angular
<uxf-progress progress="25" height="1" class="progress-bar" ></uxf-progress>
<uxf-progress progress="25" height="20" class="progress-bar" ></uxf-progress>
<UxfProgress progress="25" height="1" class="progress-bar" ></UxfProgress>
<UxfProgress progress="25" height="20" class="progress-bar" ></UxfProgress>
<uxf-progress progress="25" height="1" class="progress-bar" ></uxf-progress>
<uxf-progress progress="25" height="20" class="progress-bar" ></uxf-progress>
#
BackgroundsUse background utility classes to change the appearance of individual progress bars.
- Web Component
- React
- Angular
<uxf-progress progress="25" variant="success" ></uxf-progress>
<uxf-progress progress="50" variant="info" ></uxf-progress>
<uxf-progress progress="75" variant="warning" ></uxf-progress>
<uxf-progress progress="100" variant="danger" ></uxf-progress>
<UxfProgress progress="25" variant="success"> </UxfProgress>
<UxfProgress progress="50" variant="info"> </UxfProgress>
<UxfProgress progress="75" variant="warning"> </UxfProgress>
<UxfProgress progress="100" variant="danger"> </UxfProgress>
<uxf-progress progress="25" variant="success" ></uxf-progress>
<uxf-progress progress="50" variant="info" ></uxf-progress>
<uxf-progress progress="75" variant="warning" ></uxf-progress>
<uxf-progress progress="100" variant="danger" ></uxf-progress>
#
StripedAdd property striped to apply a stripe via CSS gradient over the progress bar’s background color.
- Web Component
- React
- Angular
<uxf-progress progress="25" variant="success" striped="true" ></uxf-progress><uxf-progress progress="50" variant="info" striped="true" ></uxf-progress><uxf-progress progress="75" variant="warning" striped="true" ></uxf-progress><uxf-progress progress="100" variant="danger" striped="true" ></uxf-progress>
<UxfProgress progress="25" variant="success" striped="true"> </UxfProgress><UxfProgress progress="50" variant="info" striped="true"> </UxfProgress><UxfProgress progress="75" variant="warning" striped="true"> </UxfProgress><UxfProgress progress="100" variant="danger" striped="true"> </UxfProgress>
<uxf-progress progress="25" variant="success" striped="true" ></uxf-progress><uxf-progress progress="50" variant="info" striped="true" ></uxf-progress><uxf-progress progress="75" variant="warning" striped="true" ></uxf-progress><uxf-progress progress="100" variant="danger" striped="true" ></uxf-progress>
#
Animated stripesThe striped gradient can also be animated. Add property animated to animate the stripes right to left via CSS3 animations.
- Web Component
- React
- Angular
<uxf-progress id="progressAnimated" progress="75" animated="true"></uxf-progress>
<uxf-button id="toggleAnimation" variant="secondary"> Toggle animation</uxf-button>
<script> const progressAnimated = document.getElementById('progressAnimated'); const toggleAnimation = document.getElementById('toggleAnimation'); toggleAnimation.addEventListener('click', function (event) { progressAnimated.animated = !progressAnimated.animated; progressAnimated.striped = !progressAnimated.striped; });</script>
<UxfProgress id="progressAnimated" progress="75" animated="true"></UxfProgress>
<UxfButton id="toggleAnimation" variant="secondary"> Toggle animation</UxfButton>
<script> const progressAnimated = document.getElementById('progressAnimated'); const toggleAnimation = document.getElementById('toggleAnimation'); toggleAnimation.addEventListener('click', function (event) { progressAnimated.animated = !progressAnimated.animated; progressAnimated.striped = !progressAnimated.striped; });</script>
import { Component } from '@angular/core';
@Component({selector: 'app-root',template: ` <uxf-progress #progress progress="75" animated="true"></uxf-progress> <uxf-button id="toggleAnimation" (click)="toggleAnimation(progress)" variant="secondary"> Toggle animation </uxf-button>`})
export class AppComponent { toggleAnimation(progress: any) { progress.el.animated = !progress.el.animated; progress.el.striped = !progress.el.striped; }}