Components
x
"use client"
import * as React from "react"安装#
pnpm dlx shadcn@latest add progress
使用方法#
import { Progress } from "@/components/ui/progress"<Progress value={33} />Composition#
带标签和数值#
使用 ProgressLabel 和 ProgressValue 添加标签和数值显示。
import {
Progress,
ProgressLabel,
ProgressValue,
} from "@/components/ui/progress"
;<Progress value={56} className="w-full max-w-sm">
<ProgressLabel>Upload progress</ProgressLabel>
<ProgressValue />
</Progress>Progress
├── ProgressLabel
├── ProgressValue
└── ProgressTrack
└── ProgressIndicatorExamples#
标签#
使用 ProgressLabel 和 ProgressValue 添加标签和数值显示。
Upload progress56%
x
import {
Progress,
ProgressLabel,受控组件#
一个可以通过滑块控制的进度条。
x
"use client"
import * as React from "react"RTL#
要启用 shadcn/ui 中的 RTL(从右到左)支持,请参阅 RTL 配置指南。
تقدم الرفع٥٦%
x
"use client"
import * as React from "react"API 参考#
请查看 Base UI Progress 文档。