Skip to content

LineProgress

Used for task progress, upload progress, step completion, and dashboard progress display.

Platform Differences

App (vue)App (nvue)H5Mini Program

Basic Usage

  • Set the progress percentage (0–100) via percentage.
html
<see-line-progress :percentage="50" />

Progress Status

  • Set the progress bar status via status, supporting normal, success, warning, error.
html
<see-line-progress :percentage="50" status="normal" />
<see-line-progress :percentage="100" status="success" />
<see-line-progress :percentage="80" status="warning" />
<see-line-progress :percentage="30" status="error" />

Custom Color

  • Customize the active bar color via activeColor, supporting solid and gradient colors.
html
<!-- Solid color -->
<see-line-progress :percentage="60" activeColor="#ff6b6b" />

<!-- Gradient color -->
<see-line-progress :percentage="80" :activeColor="['#43e97b', '#38f9d7']" />

Stripes and Animation

  • Show stripe effect via striped.
  • Enable stripe animation via animated.
html
<see-line-progress :percentage="60" striped />
<see-line-progress :percentage="80" striped animated />

Progress Bar Size

  • Set the progress bar height via strokeWidth.
html
<see-line-progress :percentage="50" strokeWidth="8rpx" />
<see-line-progress :percentage="50" strokeWidth="24rpx" />

Text Position

  • By default, text displays to the right of the progress bar.
  • Set textInside to true to display text inside the progress bar.
  • Set showText to false to hide text.
html
<!-- Outside text (default) -->
<see-line-progress :percentage="50" />

<!-- Inside text -->
<see-line-progress :percentage="60" textInside strokeWidth="32rpx" />

<!-- Hidden text -->
<see-line-progress :percentage="70" :showText="false" />

Custom Text

  • Customize the displayed text via the format function.
html
<see-line-progress :percentage="50" :format="formatText" />

<script lang="ts" setup>
const formatText = (percentage: number) => {
  return percentage === 100 ? 'Done' : `${percentage}%`
}
</script>

Round Corners and Disabled

  • Set round to false to disable round corners, defaults to true.
  • Set inactive to true for disabled state.
html
<see-line-progress :percentage="50" :round="false" />
<see-line-progress :percentage="50" inactive />

Custom Track Color

  • Customize the track background color via trackColor.
html
<see-line-progress :percentage="50" trackColor="#e8e8e8" />

Maximum Value

  • Set the maximum value via max, defaults to 100.
  • percentage is automatically converted to a percentage based on max.
html
<!-- Total 200, current 150, displays 75% -->
<see-line-progress :percentage="150" :max="200" />

API

Props

ParameterDescriptionTypeDefaultOptional ValuesPlatform Notes
percentageProgress valueNumber0Any number-
maxMaximum valueNumber100Any positive number-
strokeWidthProgress bar heightString'16rpx'Any CSS length value-
trackColorTrack background colorString'var(--see-fill-color-light, #f2f3f5)'Any CSS color value-
activeColorActive bar colorString / Array'' (uses status color)CSS color value or color array-
statusProgress bar status'normal' | 'success' | 'warning' | 'error''normal'normal, success, warning, error-
stripedWhether to show stripesBooleanfalsetrue, false-
animatedWhether to enable stripe animationBooleanfalsetrue, false-
showTextWhether to show textBooleantruetrue, false-
textInsideWhether text is inside the barBooleanfalsetrue, false-
formatCustom text format function(percentage: number) => stringundefinedAny format function-
roundWhether to use round cornersBooleantruetrue, false-
inactiveWhether in disabled stateBooleanfalsetrue, false-
durationTransition duration (ms)Number300Any positive integer-

Events

EventDescriptionCallback ParametersPlatform Notes
onChangeTriggered on progress changepercentage: number-
onCompleteTriggered when progress reaches 100%None-

Slots

Slot NameDescriptionScope Data
textCustom text content{ percentage }

Liao ICP No. 2025070134