Skip to content

Progress

Used to display the progress status of the current operation. It combines the strengths of various UIs and pioneers dual-state progress, multi-ring nesting, and high-performance circular animation effects.

Basic Usage

Linear progress bar, supporting multiple built-in semantic colors and automatic status icons.

50%
Basic Usage

Percentage Inside

Percentage does not occupy extra space, suitable for file uploads and other scenarios. You can change the height of the progress bar with stroke-width and use the text-inside attribute to place percentages inside the bar.

70%
Inner Percentage

Custom Content

Add custom content via the default slot. For circular progress, scoped slots are also supported to retrieve real-time progress.

Content
Content
80%
Progressing
Custom Content Demo

Circle and Dashboard

Enable via type="circle" or dashboard. Supports rotation animation and custom SVG gradients.

80%
50%
Visual Enhancement

Multi-ring Nesting (Premium)

By passing an array to percentage, you can achieve a multi-ring nesting effect similar to the Apple Watch.

Multi-dimensional Data
Multi-ring Race
Multi-ring Race

Striped and Flow

Enable striped to add a design sense, and striped-flow to make the progress bar "move".

60%
80%
Dynamic Striped

Advanced Features

1. Secondary Percentage

Supports the secondary-percentage attribute. Perfect for video playback buffering.

20%
Secondary State Demo

2. Stepped Progress (Steps)

The steps property allows the progress bar to be split by physical scales.

60%
Scale Segments

3. Indeterminate State

When exact values cannot be predicted (e.g., scanning, connecting).

Loading Status

Use in Nuxt

The component is perfectly adapted for Nuxt 3, supporting auto-import and unique SSR gradient IDs.

50%
Nuxt Adaptation

API

Props

PropDescriptionTypeDefault
typeProgress type'line' | 'circle' | 'dashboard''line'
percentagepercentagenumber | number[]0
secondary-percentageSecondary percentage (for buffering effect)number0
statusBuilt-in status, automatically matches color and icon'success' | 'exception' | 'warning' | 'info'
stroke-widthProgress bar widthnumber6
text-insideWhether to show text inside (line type only)booleanfalse
widthCircular canvas widthnumber126
show-textWhether to show progress text/iconbooleantrue
colorProgress color, supports function/array gradient/object gradientstring | function | string[] | Record<string, string>
define-background-colorBackground track colorstring
iconCustom status iconstring
animatedEnables circular rotation animationbooleanfalse
stepsNumber of segmentsnumber0
stroke-linecapProgress bar end shape'butt' | 'round' | 'square''round'
formatCustom text formatting functionfunction(percentage)
stripedEnables striped stylebooleanfalse
striped-flowEnables striped flow animationbooleanfalse
indeterminateEnables indeterminate slide modebooleanfalse
durationAnimation cycle duration (s)number3

Slots

Slot NameDescriptionParameters
defaultCustom content for the center or right side of the progress bar{ percentage: number }

Theme Variables

VariableDescriptionDefault
--yh-progress-bar-bgTrack backgroundvar(--yh-fill-color-darker)
--yh-progress-durationDefault animation cycle3s

Released under the MIT License.