Skip to content
Klarhimmel UI

Progress

npx shadcn add @klarhimmel/progress

Examples

  • Determinate

  • States

  • Steps

DetailsAbout, usage, props and more

A bar for a task with a known share done, or an indeterminate one while it works.

When to use

  • Use for

    A task with a known share done, or work with an unknown end.

  • Not for

    A wait under a second. Not a step indicator for a form.

  • Pairs with

    Text, Banner, Button.

Preview

progress.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { Progress } from '@/components/klarhimmel/ui/progress';

export default function Example() {
  return (
    <Theme theme="brand">
      <Progress label="Uploading room photos" value={64} showValue />
    </Theme>
  );
}

Import

Import

import { Progress } from '@/components/klarhimmel/ui/progress';
Files
progress.tsx, in components/klarhimmel/ui/. With it: theme, utils.
Render in
Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

Props

PropTypeDefaultDescription
labelstringrequiredRequired: what is progressing ("Upload", "Profile completeness").
valuenumber-0 to `max`. Omit for an indeterminate bar: work is happening and the end is unknown.
maxnumber100The value that means done.
showValueboolean-Show the label and the percentage above the bar.
classNamestring-Extra classes, merged after the component's own.