Nhảy tới nội dung
Phiên bản: 1.7.0

Progress component: Component giúp hiển thị giao diện cho biết một tiến trình đang thực hiện

Properties​

Progress​

NameTypeDefaultDescription
maxCompletednumber100Giá trị lớn nhất để hoàn thành tiến trình
completednumber0Giá trị hiện tại của tiến trình
formatLabelfunctionĐịnh dạng hiển thị label, dùng khi showLabel=
showLabelbooleanHiển thị label
strokeWidthnumberĐộ rộng stroke tính theo px
strokeColorstringMàu sắc phần đã hoàn thành
trailColorstringMàu sắc phần còn lại

Example​

import React from "react";
import { Page, Progress, Box, Text } from "zmp-ui";

export default function HomePage() {
  return (
    <Page className="section-container">
      <Text.Title size="small">Progress</Text.Title>
      <Box mt={6}>
        <Box mt={2}>
          <Box>
            <Text>Default</Text>
          </Box>
          <Progress completed={30} maxCompleted={100} />
        </Box>
        <Box mt={6}>
          <Box>
            <Text>Show Label</Text>
          </Box>
          <Progress completed={70} maxCompleted={100} showLabel />
        </Box>
      </Box>
    </Page>
  );
}