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
Color
Duration
CircularProgress
Progress
Sizing & stroke
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
| Prop | Type | Default | Description |
|---|---|---|---|
size | number | 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-width | number | 2 | Ring 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
| Prop | Type | Default | Description |
|---|---|---|---|
progress | number | — | Static progress 0-100 (disables the simulated animation) |
done | boolean | false | Fills the ring and ends the simulated progress |
max-duration | number | 15000 | Duration of the simulated progress in ms |
size | number | string | "28px" | Diameter in px or any CSS length |
stroke-width | number | 2 | Stroke thickness in px, capped at 4 |
track-color | string | — | Track color (CSS variable or value) |
track-active-color | string | — | 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:LoadingIndicatorsize (defaults to1em, or30pxwith the touch stylesheet and22pxinside a field)--indicator-stroke: ring stroke width (defaults to2px) or mobile spoke width (defaults to4pxat 30px and3pxat 22px)--indicator-color:LoadingIndicatorcolor (defaults tocurrentcolor)--indicator-rotate-duration: time of oneLoadingIndicatorturn (defaults to0.8s)--circular-progress-size:CircularProgressdiameter (defaults to28px)--circular-progress-stroke:CircularProgressstroke width (defaults to2px)--circular-progress-track-color:CircularProgressbase track (defaults to a light green)--circular-progress-track-active-color:CircularProgressprogress stroke (defaults to--green-500)
LoadingDots takes the current text color.