111k

Progress

显示任务完成进度的指示器,通常以进度条形式呈现。

"use client"

import * as React from "react"

安装

pnpm dlx shadcn@latest add progress

用法

import { Progress } from "@/components/ui/progress"
<Progress value={33} />

示例

标签

使用 ProgressLabelProgressValue 添加标签和数值显示。

import { Field, FieldLabel } from "@/components/ui/field"
import { Progress } from "@/components/ui/progress"

受控

一个可以通过滑块控制的进度条。

"use client"

import * as React from "react"

RTL

要在 shadcn/ui 中启用 RTL 支持,请参见 RTL 配置指南

"use client"

import * as React from "react"

API 参考

更多信息请参见 Radix UI Progress 文档。