DocsComponentsTemplatesThemesGitHub

Progress

Linear progress, determinate or indeterminate (omit `value`).

Code

import * as React from 'react';
import { Progress } from '@fruit-labs/design';

export default function Demo() {
  return (
    <div
      style={{
        display: 'flex',
        flexDirection: 'column',
        gap: 18,
        maxWidth: 420,
      }}
    >
      <Progress value={45} label="Downloading 2.1 of 4.6 GB" showValue />
      <Progress label="Preparing…" />
    </div>
  );
}

With label

import { Progress } from '@fruit-labs/design';

export default function Example() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 560 }}>
      <Progress label="Storage used" value={72} showValue />
      <Progress label="Syncing" value={null} />
    </div>
  );
}

Install

From npm:

npm install @fruit-labs/design

import { Progress } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/progress.json

Guidelines

  • Show what is happening in label ("Uploading 3 files"). Use indeterminate only when duration is unknown.

Props

PropTypeRequired
ariaLabelstringNo
valuenumber | nullNo
labelstringNo
showValuebooleanNo
classNamestringNo

Edit this example on GitHub