Skip to content
Latestv1.0.63

Progress ​

YhProgress displays operation progress in line, circle, and dashboard modes. It also supports multi-ring percentages, buffered tracks, striped animation, indeterminate loading, and slot-based custom content.

Basic Usage ​

The default line mode supports semantic status styles and built-in status icons.

Basic Usage

Percentage Inside ​

Use text-inside to move the progress text into the bar.

Percentage Inside

Custom Content ​

The default slot can replace the built-in label area. In all modes the slot receives the current percentage.

Custom Content

Circle and Dashboard ​

Switch type to circle or dashboard to render radial progress.

Circle and Dashboard
Gradient and Animation

Multi-ring Nesting ​

When percentage is an array, the component renders multiple concentric rings in order.

Multi-ring Nesting

Striped and Flow ​

striped adds texture to line mode, and striped-flow animates that texture with the configured duration.

Striped and Flow

Advanced Features ​

Secondary Percentage ​

Use secondary-percentage to show a buffered track behind the main value.

Secondary Percentage

Steps ​

Use steps to divide the line progress bar into fixed segments.

Steps

Indeterminate ​

Use indeterminate when the exact progress cannot be determined yet.

Indeterminate

Use in Nuxt ​

After installing @yh-ui/nuxt, YhProgress can be used directly in Nuxt 3/4 pages and components.

Use in Nuxt

API ​

Props ​

PropDescriptionTypeDefault
typeProgress mode'line' | 'circle' | 'dashboard''line'
percentageCurrent progress value, or an array in multi-ring modenumber | number[]0
secondary-percentageSecondary buffered progressnumber0
statusSemantic status style'success' | 'exception' | 'warning' | 'info'undefined
stroke-widthStroke thicknessnumber6
text-insideRender text inside the line barbooleanfalse
widthWidth of circle and dashboard modesnumber126
show-textShow text or status iconbooleantrue
colorCustom color, color function, array, or gradient mapstring | ((percentage: number) => string) | string[] | Record<string, string>''
iconCustom icon class namestring''
animatedRotate the active circular pathbooleanfalse
define-background-colorCustom track colorstring''
formatCustom formatter for the default text content(percentage: number) => stringundefined
stroke-linecapStroke line cap style'butt' | 'round' | 'square''round'
stripedEnable striped line stylingbooleanfalse
striped-flowAnimate striped line stylingbooleanfalse
indeterminateEnable indeterminate line animationbooleanfalse
durationAnimation duration in secondsnumber3
stepsNumber of visible steps in line modenumber0
theme-overridesComponent theme override variablesComponentThemeVarsundefined

Events ​

This component does not expose component events.

Slots ​

SlotDescriptionParameters
defaultReplaces the built-in label area{ percentage: number }

Expose ​

This component does not expose public instance methods or properties.

Type Exports ​

TypeDescription
YhProgressPropsComponent props type
YhProgressSlotsComponent slots type
YhProgressTypeProgress type union
YhProgressStatusProgress status union
YhProgressInstanceComponent instance type

Theme Variables ​

YhProgress supports themeOverrides. In component styles, the only dedicated component CSS variable currently consumed is the animation duration token below; colors and backgrounds mainly come from global theme tokens.

VariableDescriptionDefault
--yh-progress-durationDuration used by striped, indeterminate, and circle animations3s

Released under the MIT License.