shadcn.io is not affiliated with official shadcn/ui
Rollback History Changelog Block for React
A table of rollbacks that runs rail to rail and ends the block: the day, the version it came from and the one restored, a reason badge, a sortable time to revert and how each ended, with a summary counted from the rows.
Installation
Overview
A rollback history for React with Base UI, written for Backstep, fictional deploy tooling. A compact header carries the title, one sentence and, at its end, a summary counted from the rows ("5 rollbacks in 90 days, median 6 min"). Under a band rule the table runs from rail to rail and ends the block, its rows divided by hairlines. Each row gives the day, the version it came from and the one it went back to (in mono, with an arrow), the reason as an outline badge with an icon and a word (Bad migration, Memory leak, Config), how long the revert took and how it ended. "Time to revert" is a header button: one press sorts fastest first, the next slowest first, and a third returns to newest first; the column carries aria-sort and an arrow, and a polite line reads the result. On a phone the reason is dropped and the table scrolls sideways in a labelled region with the day pinned at the start. It's built from Guides and Badge, with CSS transitions for the entrance and your theme's tokens for every colour. For deploy dashboards, release pages and incident reviews that show how reliable going back is. The rollbacks are example data.
FAQ
How do I change the rollbacks?
Edit ROLLBACKS at the top of the file, newest first. A rollback is an id, a date as an ISO day ("2026-09-09"), the from and to versions, a reason, the minutes the revert took and an ended phrase. The summary above the table ("5 rollbacks in 90 days, median 6 min") counts the rows and takes the median of their minutes, so it stays true when you edit. The day on screen is spelled out from the ISO day by a small helper, so it reads the same on the server and in every browser. Dates are fixed, never computed from today.
How does the sort work?
Time to revert is a button inside its column header. The first press orders the rows fastest first, the second slowest first and the third returns them to newest first, so the table can always go back to its natural order. The header carries aria-sort ("ascending", "descending" or "none"), the arrow beside the label shows the direction, and a visually hidden polite line says what the table is now sorted by.
How are the reasons told apart without colour?
Each reason is an outline badge with an icon and the word: a database for a bad migration, a memory stick for a leak, sliders for a config change. A screen reader hears the word and skips the icon. The three reasons are constants at the top of the file, each an icon, an id and a label.
Why are the versions in mono and kept in order?
A version pair like "v3.9.0 to v3.8.2" has to read in the same order everywhere, so it is set in a monospaced run with an arrow between, and a visually hidden "back to" for screen readers. In a right-to-left layout the rest of the table mirrors while the pair stays in order.
How does it fit on a phone?
Below md the Reason column is dropped, and the table scrolls sideways inside a region that has a name and a focus ring, so a keyboard can scroll it. The day column stays pinned at the start with a hairline at its end, so every row keeps its date while you scroll. Nothing else on the page moves sideways at 320 pixels.
Related
- Pro
Rollback Wizard Changelog
Deploys and rolloutsA three-step rollback wizard in one framed window: pick a previous release, review what reverts and what stays, then type the version to unlock a Shine Button that opens an alert dialog and ends on a stated demo result.
- Pro
Release Blockers Changelog
Deploys and rolloutsA verdict header counted from the data with a cleared bar, a toggle group (Open, Cleared, All) and an inset framed table of blockers with owners, states as shapes and words, and the day each was opened.
- Pro
Incident Severity Changelog
Incidents and uptimeAn incident log grouped under P0 to P4 headings, with a toggle group that filters it, a band of five median-time-to-resolve cells and rows of id, title, users affected and state, each severity a shape and a word.
- Pro
Post-Mortem Changelog
Incidents and uptimeA blameless post-mortem as one framed report: three impact cells, a five-whys accordion from the symptom to the root cause, and an action-items table with owners, due days and states beside a progress bar.
- Pro
Hotfix Log Changelog
Incidents and uptimeA hotfix log on one shared version axis: each row has an urgency as an icon and a word, a bracket over the affected versions and a flag at the fix, with a toggle that dims by urgency.
- Pro
A table of services in a tinted frame with sortable column heads, 30-day uptime strips, response times and error rates, and a mark and a word on any service that is down.