logoAnt Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
5.25.1
  • Components Overview
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Space
    • Splitter
      5.21.0
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
    • Tabs
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
      5.5.0
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
    • Popover
    • QRCode
      5.1.0
    • Segmented
    • Statistic
    • Table
    • Tag
    • Timeline
    • Tooltip
    • Tour
      5.0.0
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
      5.1.0
  • Other
    • Affix
    • App
      5.1.0
    • ConfigProvider
    • Util
      5.13.0

Progress

Display the current progress of the operation.
Importimport { Progress } from "antd";
Sourcecomponents/progress
Docs
Edit this pageChangelog

Resources

Ant Design X
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

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

Common props ref:Common props

Properties that shared by all types.

PropertyDescriptionTypeDefaultVersion
formatThe template function of the contentfunction(percent, successPercent)(percent) => percent + %-
percentTo set the completion percentagenumber0-
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-
successConfigs of successfully progress bar{ percent: number, strokeColor: string }--
trailColorThe color of unfilled partstring--
typeTo set the type, options: line circle dashboardstringline
sizeProgress sizenumber | [number | string, number] | { width: number, height: number } | "small" | "default""default"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 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 number, the default value for gap is 2.number | { count: number, gap: number }-5.16.0
gapDegreeThe gap degree of half circle, 0 ~ 295number75
gapPositionThe gap position, options: top bottom left rightstringbottom
strokeWidthTo set the width of the dashboard progress, unit: percentage of the canvas widthnumber6

Design Token

Component TokenHow to use?
Token NameDescriptionTypeDefault Value
circleIconFontSizeIcon size of circular progress barstring1.1666666666666667em
circleTextColorText color of circular progress barstringrgba(0,0,0,0.88)
circleTextFontSizeText size of circular progress barstring1em
defaultColorDefault color of progress barstring#1677ff
lineBorderRadiusBorder radius of line progress barnumber100
remainingColorColor of remaining part of progress barstringrgba(0,0,0,0.06)
Global TokenHow to use?
Progress bar

A standard progress bar.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Mini size progress bar

Appropriate for a narrow area.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Mini size circular progress bar

A smaller circular progress bar.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Custom text format

You can set a custom text by setting the format prop.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Progress bar with success segment

Show several parts of progress with different status.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Custom line gradient

Gradient encapsulation, circle and dashboard will ignore strokeLinecap when setting gradient.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Circular progress bar with steps

A circular progress bar that support steps and color segments, default gap is 2px.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
5.16.0
Change progress value position

Change the position of the progress value, you can use percentPosition to adjust it so that the progress bar value is inside, outside or at the bottom of the progress bar.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
5.18.0
Circular progress bar

A circular progress bar.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Responsive circular progress bar

Responsive circular progress bar. When width is smaller than 20, progress information will be displayed in Tooltip.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Dynamic

A dynamic progress bar is better.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Dashboard

By setting type=dashboard, you can get a dashboard style of progress easily. Modify gapDegree to set the degree of gap.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Stroke Linecap

By setting strokeLinecap="butt", you can change the linecaps from round to butt, see stroke-linecap for more information.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Progress bar with steps

A progress bar with steps.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Progress size

The size of progress.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
30%
50%
30%
50%
30%
75 Days
Done
60%
60%
60%
99.9%
50%
90%
93%
90%
93%
Custom count:
Custom gap:
50%
0%
10%
50%
60%
100%
60%
60%
75%
代码发布
0%
0%
75%
75%
75%
75%
75%
50%
30%
60%
50%
50%
50%
50%
50%
50%
50%
50%
50%
50%
50%