Flutter docs
Default skin

Progress

Display the current progress of the operation.

When to use

If it will take a long time to complete an operation, you can use Progress to show the current progress and status.

  • When an operation will interrupt the current interface, or it needs to run in the background for more than 2 seconds.
  • When you need to display the completion percentage of an operation.

Examples

API

Progress are exported from @ceebee/ui/client.

Progress

PropertyDescriptionTypeDefaultVersion
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-6.0.0
formatThe template function of the contentfunction(percent, successPercent)(percent) => percent + %-
percentTo set the completion percentagenumber0-
railColorThe color of unfilled partstring--
showInfoWhether to display the progress value and the status iconbooleantrue-
statusTo set the status of the Progress, options: success exception normal active(line only)string--
strokeColorThe color of progress barstring--
strokeLinecapTo set the style of the progress linecapround | butt | square, see stroke-linecapround-
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-6.0.0
successConfigs of successfully progress bar{ percent: number, strokeColor: string }--
trailColorThe color of unfilled part. Please use railColor insteadstring--
typeTo set the type, options: line circle dashboardstringline-
sizeProgress sizenumber | \[number | string, number] | { width: number, height: number } | "small" | "medium""medium"5.3.0, Object: 5.18.0

type="line"

PropertyDescriptionTypeDefaultVersion
stepsThe total step countnumber--
roundingThe function to round the value(step: number) => numberMath.round5.24.0
strokeColorThe color of progress bar, render linear-gradient when passing an object, could accept string[] when has steps.string | string[] | { from: string; to: string; direction: string }-4.21.0: string[]
percentPositionProgress value position, passed in object, align indicates the horizontal position of the value, type indicates whether the value is inside or outside the progress bar{ align: string; type: string }{ align: \"end\", type: \"outer\" }5.18.0

type="circle"

PropertyDescriptionTypeDefaultVersion
stepsThe total step count. When passing an object, count refers to the number of steps, and gap refers to the distance between them. When passing a number, the default value for gap is 2.number | { count: number, gap: number }-5.16.0
strokeColorThe color of circular progress, render gradient when passing an objectstring | { number%: string }--
strokeWidthTo set the width of the circular progress, unit: percentage of the canvas widthnumber6-

type="dashboard"

PropertyDescriptionTypeDefaultVersion
stepsThe total step count. When passing an object, count refers to the number of steps, and gap refers to the distance between them. When passing a number, the default value for gap is 2.number | { count: number, gap: number }-5.16.0
gapDegreeThe gap degree of half circle, 0 ~ 295number75-
gapPlacementThe gap placement, options: top bottom start endstringbottom-
gapPositionThe gap position, options: top bottom left right, please use gapPlacement insteadstringbottom-
strokeWidthTo set the width of the dashboard progress, unit: percentage of the canvas widthnumber6-