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

Destroying forever...

Duration

CircularProgress

Progress

Sizing & stroke

size
30
strokeWidth
2

Color

LoadingDots

Color

Phone spinner

With the optional touch stylesheet, the spinner uses eight rounded spokes. The default size is 20px, the iOS 27 Regular spinner, also inside a field (an Input adornment, an InputGroup addon or a SelectControl, through --control-indicator-size); up to 16px, as :size="14", takes the Small spokes and from 28px, as :size="35", the Large ones. Explicit sizes, color and animation duration remain configurable. Desktop keeps the circular ring.

API

LoadingIndicator

PropTypeDefaultDescription
sizenumber | string"1em"Size in px or any CSS length. Defaults to 20px with the optional touch stylesheet, also inside a field. Also accepts --indicator-size.
stroke-widthnumber2Ring stroke or mobile spoke width in px. Mobile spokes default to the iOS 27 kit proportion: 2/14 of the size up to 16px, 4/30 to 27px, 5/35 from 28px.

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, or 30px with the touch stylesheet and 22px inside a field)
  • --indicator-stroke: ring stroke width (defaults to 2px) or mobile spoke width (defaults to 4px at 30px and 3px at 22px)
  • --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.