---
title: Progress
description: Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
base: base
component: true
links:
  doc: https://base-ui.com/react/components/progress
  api: https://base-ui.com/react/components/progress#api-reference
---

```tsx
'use client'

import * as React from 'react'

import { Progress } from '@/components/ui/progress'

export function ProgressDemo() {
  const [progress, setProgress] = React.useState(13)

  React.useEffect(() => {
    const timer = setTimeout(() => setProgress(66), 500)
    return () => clearTimeout(timer)
  }, [])

  return <Progress value={progress} className="w-[60%]" />
}
```

## Installation

<CodeTabs>

<TabsList>
  <TabsTrigger value="cli">Command</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">

```bash
moi ui-components add progress
```

</TabsContent>

<TabsContent value="manual">

<Steps className="mb-0 pt-2">

<Step>Install the following dependencies:</Step>

```bash
npm install @base-ui/react
```

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource
  name="progress"
  title="components/ui/progress.tsx"
  styleName="base-nova"
/>

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</CodeTabs>

## Usage

```tsx showLineNumbers
import { Progress } from '@/components/ui/progress'
```

```tsx showLineNumbers
<Progress value={33} />
```

## Composition

### With label and value

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

```tsx showLineNumbers
import { Progress, ProgressLabel, ProgressValue } from '@/components/ui/progress'
;<Progress value={56} className="w-full max-w-sm">
  <ProgressLabel>Upload progress</ProgressLabel>
  <ProgressValue />
</Progress>
```

```text
Progress
├── ProgressLabel
├── ProgressValue
└── ProgressTrack
    └── ProgressIndicator
```

## Label

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

```tsx
import { Progress, ProgressLabel, ProgressValue } from '@/components/ui/progress'

export function ProgressWithLabel() {
  return (
    <Progress value={56} className="w-full max-w-sm">
      <ProgressLabel>Upload progress</ProgressLabel>
      <ProgressValue />
    </Progress>
  )
}
```

## Controlled

A progress bar that can be controlled by a slider.

```tsx
'use client'

import * as React from 'react'

import { Progress } from '@/components/ui/progress'
import { Slider } from '@/components/ui/slider'

export function ProgressControlled() {
  const [value, setValue] = React.useState(50)

  return (
    <div className="flex w-full max-w-sm flex-col gap-4">
      <Progress value={value} className="w-full" />
      <Slider
        value={value}
        onValueChange={value => setValue(value as number)}
        min={0}
        max={100}
        step={1}
      />
    </div>
  )
}
```

## RTL

```tsx
'use client'

import * as React from 'react'

import { useTranslation, type Translations } from '@/components/language-selector'
import { Progress, ProgressLabel, ProgressValue } from '@/components/ui/progress'

const translations: Translations = {
  en: {
    dir: 'ltr',
    values: {
      label: 'Upload progress'
    }
  },
  ar: {
    dir: 'rtl',
    values: {
      label: 'تقدم الرفع'
    }
  },
  he: {
    dir: 'rtl',
    values: {
      label: 'התקדמות העלאה'
    }
  }
}

function toArabicNumerals(num: number): string {
  const arabicNumerals = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩']
  return num
    .toString()
    .split('')
    .map(digit => arabicNumerals[parseInt(digit, 10)])
    .join('')
}

export function ProgressRtl() {
  const { dir, t, language } = useTranslation(translations, 'ar')

  const formatNumber = (num: number): string => {
    if (language === 'ar') {
      return toArabicNumerals(num)
    }
    return num.toString()
  }

  return (
    <Progress value={56} className="w-full max-w-sm" dir={dir}>
      <ProgressLabel>{t.label}</ProgressLabel>
      <ProgressValue>
        {value => <span className="ms-auto">{formatNumber(parseFloat(value ?? '0'))}%</span>}
      </ProgressValue>
    </Progress>
  )
}
```

## API Reference

See the [Base UI Progress](https://base-ui.com/react/components/progress#api-reference) documentation.
