react ~6 KB 0 deps v0.1.0 ↗ GitHub ↗

@mshafiqyajid/react-progress

Headless progress hook, styled progress bar and circular ring. Indeterminate state, 5 tones, sizes, animated stripe, value display.

Playground #

Progress
Props
60
TSX
import { ProgressBar } from "@mshafiqyajid/react-progress/styled";
import "@mshafiqyajid/react-progress/styles.css";

<ProgressBar
  tone="primary"
/>

Install #

npm install @mshafiqyajid/react-progress

Quick start #

import { ProgressBar, ProgressCircle } from "@mshafiqyajid/react-progress/styled";
import "@mshafiqyajid/react-progress/styles.css";

<ProgressBar value={75} tone="primary" showValue />
<ProgressBar tone="success" animated /> {/* indeterminate */}
<ProgressCircle value={60} tone="primary" showValue />

ProgressBar API #

PropTypeDefaultDescription
valuenumberProgress value 0–100. Omit for indeterminate
size"sm" | "md" | "lg""md"Height
tone"neutral" | "primary" | "success" | "warning" | "danger""neutral"Color
labelstringAccessible label
showValuebooleanfalseShow percentage text
animatedbooleanfalseAnimated stripe (indeterminate)
roundedbooleantrueRounded ends

ProgressCircle API #

PropTypeDefaultDescription
valuenumberProgress value 0–100. Omit for indeterminate spin
size"sm" | "md" | "lg" | number"md"Size (or custom px)
tone"neutral" | "primary" | "success" | "warning" | "danger""neutral"Color
showValuebooleanfalseShow percentage inside ring
strokeWidthnumber4Ring stroke thickness
Edit this page on GitHub