🌐 Nodejs.cn

显示指示任务完成进度的指示器,通常显示为进度条。

"use client"

import * as React from "react"

安装

🌐 Installation

pnpm dlx shadcn@latest add progress

用法

🌐 Usage

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

示例

🌐 Examples

标签

🌐 Label

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

🌐 Use ProgressLabel and ProgressValue to add a label and value display.

Upload progress
import {
  Progress,
  ProgressLabel,

受控

🌐 Controlled

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

🌐 A progress bar that can be controlled by a slider.

"use client"

import * as React from "react"

从右到左

🌐 RTL

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

🌐 To enable RTL support in shadcn/ui, see the RTL configuration guide.

تقدم الرفع
"use client"

import * as React from "react"

API参考

🌐 API Reference

请参阅 Base UI Progress 文档。

🌐 See the Base UI Progress documentation.