shadcn.io is not affiliated with official shadcn/ui
Incident Escalation Settings Block for React
An escalation policy on a vertical rail whose axis is the clock: tiers with a target, a channel group and a timeout, cumulative minutes on every node, add, move and remove, and a re-page switch.
Installation
Overview
Show who gets paged, in what order and after how long, with this incident escalation panel for React with Base UI. Inside a hairline frame with a plus mark on each corner, a vertical rail lists the tiers of the policy, and its nodes are the clock: the first reads 0 and each later one reads the minute that tier is paged, the sum of the timeouts before it. Each tier holds a Native Select for who is paged (a rota or a role), a Toggle Group of Phone, SMS and Push that never goes empty, and a Number Input for how many minutes that tier has to answer. Icon buttons move a tier up or down or remove it, an outline button adds one up to four, and every change re-sums the axis and rewrites the sentence under the rail ("Engineering manager is paged at minute 25 if nobody has answered"). A second band holds a Switch that re-pages the last tier every five minutes. The last band counts unsaved changes in a status line beside a Shine Button to save them and an outline Button to discard them; Save is refused while two tiers page the same target. On a phone the rail keeps its axis and each tier's controls stack under its name. It's built from Native Select, Toggle Group, Number Input, Switch, Field, Button, Shine Button and Guides, with a CSS entrance only. For on-call tools, incident response settings and any chain of approvals with timeouts.
FAQ
How do I fill it with my own tiers and targets?
Edit the constants at the top. TARGETS lists who can be paged (a rota or a role, with the label the menu shows), SAVED is the policy the account has stored when the page opens: each tier has a stable id, its target, its channels and the minutes it has to answer before the next tier is paged. MAX_TIERS and MAX_MINUTES are the limits. The axis, the sentence under the rail and the counts are worked out from those, so nothing is typed twice.
How is the minute on each node worked out?
The first tier is paged at minute 0. Each later tier is paged at the sum of the timeouts of the tiers before it, so a ten-minute timeout on tier 1 and a fifteen-minute one on tier 2 puts tier 3 at minute 25. The last tier has no timeout of its own, since nothing follows it; what happens after it is the re-page switch. Change a timeout, move a tier or remove one and every node after it is recalculated at once, because the numbers are never stored, only the timeouts are.
How do moving, adding and removing work for a keyboard?
Each tier has real buttons named for who it pages ("Move Secondary on-call up", "Remove Engineering manager from the policy"), so there is no drag handle to miss. The first tier's Up button and the last tier's Down button stay focusable but say there is nowhere to go; the only tier left can't be removed, and a fifth can't be added. After a move the focus stays on the button you pressed, in its new place, after an add it goes to the new tier's menu, and after a remove to the neighbour's. The status line says what happened, such as "Secondary on-call: tier 1 of 3."
What happens when I press Save, and what stays local?
Nothing leaves the page, and nobody is paged. The block keeps two copies of the policy, the saved one and the one being edited, and counts how many settings differ, so the status line can say "3 changes not saved yet." Save makes the edited copy the saved one and says it was saved in this demo; Discard puts the saved copy back. Save also refuses while two tiers page the same target, with a reason and focus on the first of them, since escalating to the same person is not an escalation. To make it real, send the edited copy to your API in the save handler and update the saved copy from the response. Save and Discard are marked aria-disabled rather than disabled while nothing changed, so they keep their place and focus.
Why does typing a timeout wait until I leave the field?
The number is kept as typed while you edit it, and kept within 1 to 60 minutes when you leave the field, so a half-typed "1" on its way to "15" never rewrites the axis under you. The up and down buttons step by one minute.
How does it look on a phone?
The rail keeps its narrow axis at the start with the minute on every node, and each tier's controls stack under its name: the menu, the three chips and the timeout, one under the other, with the three tier buttons at the end of its heading. The sentence under the rail has room reserved so adding a tier never moves the buttons below, and the save bar stays pinned to the bottom of the screen.
Related
- Pro
Notification Preferences Settings
NotificationsA notification settings panel: a channel strip with all-or-nothing checkboxes, a matrix of switches by activity and channel with a locked security email, quiet hours, and a save bar that counts unsaved changes.
- Pro
Alert Rules Settings
Alerts and auditAn alert rules panel where each rule is a sentence you edit in place with menus and a number field, beside a framed chart of its metric with the threshold line and a computed count of how often it would have fired.
- Pro
Mobile Push Settings
NotificationsA push settings panel that leads with a 24-hour strip of quiet hours, a critical-alerts switch, and per-device Push, Sound and Badge toggles with a save bar that counts unsaved changes.
- Pro
Usage Alerts Billing
Plan and usageUsage alert settings: percentage thresholds as switches with number inputs, recipients as email chips, and a choice between email and a webhook, with a save that checks them.
- Pro
Alert Rules Changelog
Incidents and uptimeSix changed alert rules as cells on shared hairlines, each with a threshold track showing the old marker hollow and the new one solid, the figures in words, the channels it reaches and its severity, with a channel toggle that steps back the rules that never reach it.
- Pro
Audit Log Settings
Alerts and auditA settings change history in a fixed-height window: changes grouped by area in folds with counts, an actor filter, and a detail pane with the before and after values, who and when, and a Revert that undoes only the latest change to a setting, marks the original and adds a revert event at the top.