shadcn-remix
GitHub

Progress

Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.

import { css, type Handle } from 'remix/component'

import { Progress } from '#app/ui/progress.tsx'

export function ProgressDemo(handle: Handle) {
  let progress = 13
import { css, type Handle } from 'remix/component'

import { Progress } from '#app/ui/progress.tsx'

export function ProgressDemo(handle: Handle) {
  let progress = 13

  handle.queueTask(() => {
    let timer = setTimeout(() => {
      progress = 66
      void handle.update()
    }, 500)
    handle.signal.addEventListener('abort', () => clearTimeout(timer))
  })

  return () => <Progress value={progress} mix={css({ width: '60%' })} />
}

Installation

$ pnpm dlx shadcn@latest add https://www.shadcn-remix.com/r/progress.json

Usage

import { Progress } from '#app/ui/progress.tsx'
<Progress value={33} />

API Reference

Progress

A role="progressbar" track with an indicator.

PropTypeDefault
valuenumber | null-
maxnumber100
getValueLabel(value: number, max: number) => string-
mixMixValue-