Indicators

Loading and progress indicators, from circular spinners and determinate progress rings to animated dots, with configurable color and stroke.

import { LoadingIndicator, CircularProgress, LoadingDots } from "@plexui/vue/components/Indicator";

Examples

Overview

LoadingIndicator

Sizing & stroke

size
30
strokeWidth
2

Color

Duration

CircularProgress

Progress

Sizing & stroke

size
30
strokeWidth
2

Color

LoadingDots

Color

API

LoadingIndicator

PropTypeDefaultDescription
sizenumber | string"1em"Size in px or any CSS length (or use the --indicator-size CSS variable)
stroke-widthnumber2Stroke width in px

CircularProgress

PropTypeDefaultDescription
progressnumber—Static progress 0-100 (disables the simulated animation)
donebooleanfalseFills the ring and ends the simulated progress
max-durationnumber15000Duration of the simulated progress in ms
sizenumber | string"28px"Diameter in px or any CSS length
stroke-widthnumber2Stroke thickness in px, capped at 4
track-colorstring—Track color (CSS variable or value)
track-active-colorstring—Active segment color

A style attribute replaces the size, stroke and color variables these props set. All other <span> (LoadingIndicator) or <div> (CircularProgress, LoadingDots) attributes are forwarded.

Styling

The indicators read these CSS custom properties, each with a fallback. Set them at any scope to restyle the indicators inside it:

  • --indicator-size: LoadingIndicator size (defaults to 1em)
  • --indicator-stroke: LoadingIndicator stroke width (defaults to 2px)
  • --indicator-color: LoadingIndicator color (defaults to currentcolor)
  • --indicator-rotate-duration: time of one LoadingIndicator turn (defaults to 0.8s)
  • --circular-progress-size: CircularProgress diameter (defaults to 28px)
  • --circular-progress-stroke: CircularProgress stroke width (defaults to 2px)
  • --circular-progress-track-color: CircularProgress base track (defaults to a light green)
  • --circular-progress-track-active-color: CircularProgress progress stroke (defaults to --green-500)

LoadingDots takes the current text color.