shadcn.io is not affiliated with official shadcn/ui
Data Sync Live Banner Block for React
A sync callout for a data warehouse: one run plays on load, a counter rolling up to 1,248 records over a thin progress bar, then "Warehouse synced" with a countdown to the next run.
Installation
Overview
A sync callout for React with Base UI, for a pipeline that should show its work. A muted shell with + marks on its corners holds a raised panel: a status dot, a heading, a line about what the run is doing, a large record counter and a log link. On load one run plays: the counter rolls up to 1,248 records, a thin bar fills along the panel's foot, and when it reaches the end the heading turns to "Warehouse synced", the bar fades and the line becomes a countdown to the next run, three minutes after the moment the run finished. It runs once and never loops; with reduced motion it opens on the settled state. A polite status line that is in the page from the start says when it's done. It's built from Guides, Status, Progress, Sliding Number and Countdown Text, with your theme's tokens for every colour. For ETL jobs, imports, backups and any run you want people to see finish.
FAQ
Is the sync real?
No: it's a simulated run so the block always shows the same story. TOTAL is the record count and STEPS is how far through the run is at each tick (a tick every 320 ms), so the counter and the bar come from one number. To drive it from a real job, replace the steps with the job's progress, keep done as "progress is complete", and set the next-run time from the job's schedule.
How is the next run counted?
The countdown is a Countdown Text in its digital format, aimed at three minutes after the moment the run finished. It's worked out in the browser after the first render, so there is never a calendar date and the server's markup is stable: until the run ends, the line holds a plain 03:00 so nothing shifts. At zero it stops and stays at 00:00.
What moves, and what happens with reduced motion?
The counter's digits roll like an odometer and the bar grows with a CSS transition, for a few seconds, once. With reduced motion the run is already over when the block shows: the counter reads 1,248, the heading says synced and the countdown has started.
What do screen readers hear?
The visually hidden status line that is in the page from the start says "Sync finished, 1,248 records reconciled." when the run ends. The counter rolling up and the countdown ticking are not announced: a polite region that spoke every second would drown out the page. The progress bar is labelled "Sync progress".
Why doesn't the text jump when the run ends?
The two headings share one grid cell, and so do the two lines under them; the one not showing is invisible and hidden from assistive technology, so the cell keeps the taller height. The counter uses tabular digits, so its width only grows when it gains a digit.
Related
- Pro
Integration Sync Live Banner
Live statusAn integrations callout for a hub: a live "3 of 4 integrations syncing" count over four connector chips with a status dot each; the disconnected one offers Reconnect, and the count turns to "4 of 4".
- Pro
Connectivity Live Banner
Live statusA connection top bar for a collaborative editor, wired to the browser's online and offline events: Connected, then "You're offline" with a Retry now button and a tinted strip, then "Back online" for a few seconds.
- 72%Pro
An export job in one row for an invoicing tool: a thin progress bar with its percentage and seconds left that fills once and turns into a Download button, with Cancel and Run again.
- Pro
Live Indicator Banner
Live statusA heartbeat callout for a monitoring tool: a framed status dot that sends out one ring on each poll, an all-systems-operational heading, a line with how long ago it checked and the p95 latency, and a status-page link.
- 09:58Pro
Session Countdown Banner
CountdownsA session timeout notice for a banking console: a shield, the minutes and seconds left, a Stay signed in button that starts the time over, a warning shield in the last minute, and a Sign in again link at zero.
- Pro
API Health Live Banner
Live statusA live-health callout for an API gateway: a green status dot, an all-operational heading, a sentence with the median response time and the one slow minute, a status-page link, and a framed figure of the last 30 minutes as slim latency bars.