Progress Bar Block
edgestore/progress-bar-blockFreeBlock
A demo block showing a horizontal progress bar with animated progress.
Live preview
live · rendered by the registry
Rendered by EdgeStore on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://edgestore.dev/r/progress-bar-block.jsonSource
1import * as React from 'react';2import { ProgressBar } from '../progress-bar';34export function ProgressBarUsage() {5 const [progress, setProgress] = React.useState(0);67 React.useEffect(() => {8 const startAnimation = () => {9 const interval = setInterval(() => {10 setProgress((prevProgress) => {11 if (prevProgress >= 100) {12 clearInterval(interval);13 // Reset after 1 second when reaching 100%14 setTimeout(() => {15 setProgress(0);16 startAnimation(); // Restart the animation cycle17 }, 1000);18 return 100;19 }20 // Add a random value between 10-20 percent21 return Math.min(22 100,23 prevProgress + Math.floor(Math.random() * 11) + 10,24 );25 });26 }, 300);2728 return interval;29 };3031 const interval = startAnimation();3233 return () => {34 clearInterval(interval);35 };36 }, []);3738 return (39 <div className="flex w-full items-center justify-center p-4">40 <ProgressBar progress={progress} className="w-full max-w-sm" />41 </div>42 );43}
What it pulls in
Other registry items
Files it writes
More from EdgeStore
All 12 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Dropzonedropzone | EdgeStore | Blocks | Free | 2 deps | |
| File Uploaderfile-uploader | EdgeStore | Blocks | Free | 2 deps | |
| File Uploader Blockfile-uploader-block | EdgeStore | Blocks | Free | no deps | |
| Image Uploaderimage-uploader | EdgeStore | Blocks | Free | 2 deps | |
| Multi Image Uploader Blockmulti-image-uploader-block | EdgeStore | Blocks | Free | no deps | |
| Progress Circle Blockprogress-circle-block | EdgeStore | Blocks | Free | no deps | |
| Single Image Dropzone Blocksingle-image-dropzone-block | EdgeStore | Blocks | Free | no deps |
