Skip to main content

Progressbar

A basic widget for showing the work progress.

import { Progressbar } from "rizzui";

Default

The default style of Progressbar.

import { Progressbar } from "rizzui";

export default function App() {
return <Progressbar value={75} />;
}

Variants

You can change the style of Progressbar using variant property.

import { Progressbar } from "rizzui";

export default function App() {
return (
<>
<Progressbar
variant="flat"
value={75}
/>
<Progressbar
variant="solid"
value={75}
/>
</>
);
}

Sizes

You can change the size of Progressbar using size property.

import { Progressbar } from "rizzui";

export default function App() {
return (
<>
<Progressbar
value={45}
size="sm"
/>
<Progressbar value={65} />
<Progressbar
value={75}
size="lg"
/>
<Progressbar
value={85}
size="xl"
/>
</>
);
}

Rounded

You can change the border radius of Progressbar using rounded property.

import { Progressbar } from "rizzui";

export default function App() {
return (
<>
<Progressbar
value={45}
rounded="sm"
/>
<Progressbar value={65} />
<Progressbar
value={75}
rounded="md"
/>
<Progressbar
value={85}
rounded="lg"
/>
<Progressbar
value={95}
rounded="none"
/>
</>
);
}

Colors

You can change the color of Progressbar using color property.

import { Progressbar } from "rizzui";

export default function App() {
return (
<>
<Progressbar value={25} />
<Progressbar
value={45}
color="secondary"
/>
<Progressbar
value={65}
color="danger"
/>
<Progressbar
value={75}
color="info"
/>
<Progressbar
value={85}
color="success"
/>
<Progressbar
value={95}
color="warning"
/>
</>
);
}

With Label and Label Position

You can set label of Progressbar using label property. And set position of label using labelPosition property.

Note: labelPosition='insideBar' property will only work when size="xl".

75%

75%

75%

import { Progressbar } from "rizzui";

export default function App() {
return (
<div className="grid grid-cols-1 gap-10 w-full">
<Progressbar
value={75}
label="75%"
/>
<Progressbar
value={75}
label="75%"
labelPosition="inlineLeft"
/>
<Progressbar
value={75}
label="75%"
size="xl"
labelPosition="insideBar"
/>
</div>
);
}

API Reference


Progressbar Props

Here is the API documentation of the Progressbar component.

PropsTypeDescriptionDefault
valuenumberPercentage of filled bar__
labelstringPass label to show percentage inside bar. It will only work when size="xl"""
variantsolid flatThe variants of the components are:"solid"
sizeProgressbarSizeSize of the components are"md"
roundedProgressbarRoundedThe rounded variants are:"pill"
colorProgressbarColorPass color variations"primary"
labelPositionProgressbarLabelPositionSets the label position of progressbar component"inlineRight"
classNamestringTo style the root of the component__
barClassNamestringTo style bar of the component__
trackClassNamestringTo style progressbar track of the component__
labelClassNamestringTo style label__

Progressbar Sizes

type ProgressbarSizes = "sm" | "md" | "lg" | "xl";

Progressbar Rounded

type ProgressbarRounded = "sm" | "md" | "lg" | "pill" | "none";

Progressbar Colors

type ProgressbarColors = "primary" | "secondary" | "danger" | "info" | "success" | "warning";

Progressbar Label Position

type ProgressbarLabelPosition = "inlineLeft" | "inlineRight" | "insideBar";