Skip to Content
Documentation
Saas UI
Get Pro
Getting started
Components
Overview

Progress

Used to display the progress status for a task.

SourceStorybookRecipeArk

Anatomy

import { Progress } from '@saas-ui/react/progress'
<Progress.Root>
  <Progress.Label />
  <Progress.ValueText />
  <Progress.Bar />
</Progress.Root>

Examples

Sizes

Use the size prop to change the size of the progress bar.

Variants

Use the variant prop to change the visual style of the progress bar.

Colors

Use the colorPalette prop to change the color of the progress bar.

gray

red

green

blue

teal

pink

purple

cyan

orange

yellow

Inline Label

Compose the ProgressLabel and ProgressValueText components to create an inline label for the progress bar.

40%

Info tip

Use the info prop to add a tooltip to the progress bar.

Indeterminate

Set the value to null to show an indeterminate progress bar.

Stripes

Set the striped prop to true to add stripes to the progress bar.

Animated Stripes

Set the animated prop to true to animate the stripes.

Props

Root

PropDefaultType
defaultValue '50'
number

The initial value of the progress bar when rendered. Use when you don't need to control the value of the progress bar.

formatOptions '{ style: \'percent\' }'
NumberFormatOptions

The options to use for formatting the value.

locale '\'en-US\''
string

The locale to use for formatting the value.

max '100'
number

The maximum allowed value of the progress bar.

min '0'
number

The minimum allowed value of the progress bar.

orientation '\'horizontal\''
'horizontal' | 'vertical'

The orientation of the element.

colorPalette 'gray'
'gray' | 'zinc' | 'neutral' | 'stone' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'presence' | 'status' | 'sidebar' | 'sidebar.accent' | 'accent' | 'slate'

The color palette of the component

variant 'outline'
'outline' | 'subtle'

The variant of the component

shape 'rounded'
'square' | 'rounded' | 'full'

The shape of the component

size 'md'
'xs' | 'sm' | 'md' | 'lg' | 'xl'

The size of the component

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
id
string

The unique identifier of the machine.

ids
Partial<{ root: string; track: string; label: string; circle: string }>

The ids of the elements in the progress bar. Useful for composition.

onValueChange
(details: ValueChangeDetails) => void

Callback fired when the value changes.

translations
IntlTranslations

The localized messages to use.

value
number

The controlled value of the progress bar.

striped
'true' | 'false'

The striped of the component

animated
'true' | 'false'

The animated of the component

as
React.ElementType

The underlying element to render.

unstyled
boolean

Whether to remove the component's style.

Previous

Popover

Next

Radio Card