🌐 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

使用 Field 组件为进度条添加标签。

🌐 Use a Field component to add a label to the progress bar.

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

受控

🌐 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

请参阅 Radix UI Progress 文档。

🌐 See the Radix UI Progress documentation.