Progress
import {Progress} from "@qui/react-vscode"
Examples
Showcase
Dark Modern
Label
import type {ReactElement} from "react"import {Progress} from "@qui/react-vscode"export default function Showcase(): ReactElement {return (<Progress.Root className="w-[240px]"><Progress.Label>Label</Progress.Label><Progress.Track><Progress.Bar /></Progress.Track></Progress.Root>)}
Layout
Compose the label and value in different DOM positions to create an inline progress bar.
Dark Modern
Label
50
import type {ReactElement} from "react"import {Progress} from "@qui/react-vscode"export default function Layout(): ReactElement {return (<Progress.Root className="w-[240px]" defaultValue={50}>{({value}) => (<div className="flex gap-4"><Progress.Label>Label</Progress.Label><Progress.Track><Progress.Bar /></Progress.Track><Progress.Value>{value}</Progress.Value></div>)}</Progress.Root>)}
API
ProgressRootProps
| Name & Description | Option(s) | Default |
|---|---|---|
The component used for the root node. It can be a React component or
element. |
| 'div' |
| ||
The initial value of the progress when it is first rendered. Use when you do
not need to control the state of the progress. |
| |
The maximum allowed value of the progress bar. |
| |
The minimum allowed value of the progress bar. |
| |
Callback fired when the value changes. |
| |
The current value of the progress bar. |
|
Type
| ElementType| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or
element.
Type
number
Description
The initial value of the progress when it is first rendered. Use when you do
not need to control the state of the progress.
Type
number
Description
The maximum allowed value of the progress bar.
Type
number
Description
The minimum allowed value of the progress bar.
Type
(value: number | object,) => void
Description
Callback fired when the value changes.
Type
number
Description
The current value of the progress bar.