Progress

Displays a progress bar indicating task completion.

Installation

If @melio-ui/react is already installed globally, you can skip this step.

Import

  • ProgressRoot: All parts of the progress are included.
  • ProgressIndicator: Render the progress indicator. You can style it yourself.

Another way to import

'use client';
import { Progress } from '@melio-ui/progress';
<Progress.Root value={30}>
<Progress.Indicator />
</Progress.Root>;

'use client' must be used when rendering on the server side.

API Reference

ProgressRoot

All parts of the progress are included.

PropTypeDefaultDescription
valuenumber-It is the progress value.
maxnumber100This is the maximum progress value.
indeterminateboolean-This means that progress is uncertain.
Data attributeValues
[data-state]"complete" | "loading" | "indeterminate"
[data-value]The current value
[data-max]The max value

ProgressIndicator

Render the progress indicator. You can style it yourself.

Data attributeValues
[data-state]"complete" | "loading" | "indeterminate"
[data-value]The current value
[data-max]The max value

Examples

Indeterminate

<ProgressRoot indeterminate>
<ProgressIndicator />
</ProgressRoot>

Custom Indicator

<ProgressRoot value={30}>
<ProgressIndicator style={{ backgroundColor: '#ff4d4f' }} />
</ProgressRoot>

Max

<ProgressRoot value={100} max={200}>
<ProgressIndicator />
</ProgressRoot>
DocsMelioUI
Copyright © Ahn Co. All rights reserved.