ProgressSpinnerProgressSpinner is a process status indicator.

ProgressSpinner - 图1

Documentation

Import

  1. import {ProgressSpinnerModule} from 'primeng/progressspinner';
  2.  

Getting Started

ProgressSpinner is defined using p-progressSpinner element.

  1. <p-progressSpinner></p-progressSpinner>
  2.  

Colors

Colors of the spinner can be changed by overriding the keyframes animation

  1. @keyframes ui-progress-spinner-color {
  2. 100%,
  3. 0% {
  4. stroke: #d62d20;
  5. }
  6. 40% {
  7. stroke: #0057e7;
  8. }
  9. 66% {
  10. stroke: #008744;
  11. }
  12. 80%,
  13. 90% {
  14. stroke: #ffa700;
  15. }
  16. }
  17.  

Properties

NameTypeDefaultDescription
strokeWidthstring2Width of the circle stroke.
fillstringnullColor for the background of the circle.
animationDurationstring2sDuration of the rotate animation.

Styling

Following is the list of structural style classes, for theming classes visit theming page.

NameElement
ui-progress-spinnerContainer element.
ui-progress-circleSVG element.
ui-progress-pathCircle element.

Dependencies

None.

Source

View on GitHub

  1. <h3>Basic</h3>
  2. <p-progressSpinner></p-progressSpinner>
  3. <h3>Custom</h3>
  4. <p-progressSpinner [style]="{width: '50px', height: '50px'}" strokeWidth="8" fill="#EEEEEE" animationDuration=".5s"></p-progressSpinner>
  5.