Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

On-Call Shift Swap Success Block for React

A confirmation panel for two people swapping on-call shifts: the week's rota as a native table of three people by seven days with the swapped cells marked, a row of your alerts, and a switch that mutes them during the swap.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Confirm a shift swap where everyone can check it with this confirmation panel for React with Base UI. It's the panel Vigilrota, an on-call scheduling app, shows when two people have swapped shifts: a header with one action, the Shine Button that opens the rotation, over one framed card in three bands ruled by Guides. The first is the week's rota as a native table, three people down the side and seven days across, with each person's part that day (primary, backup or off) and the two swapped shifts marked in both people's cells with a swap glyph and the words "was you" and "now Marcus", plus a last row for your alerts. The second is a Switch, "Mute my alerts during the swap", which changes the swapped day in that last row. The third says so in a polite status line. For on-call and shift scheduling, rotas and any hand-off between people over days.

FAQ

What stays in the page, and how do I wire it for real?

Nothing was swapped and no alert was muted. The three people, the week, who is primary and backup each day and the two swaps are typed sample data, and the switch only changes this page. To wire it, build WEEK and SWAPS from your schedule, set AS_OF from the day you render and send the switch's change to your paging service.

How is the rota built, and is it accessible?

It's a native table on every base, with a caption for assistive technology, the days as column headings and each person's name as a row heading, inside a scrollable named region. The cells are computed from the typed week and swaps: a swapped shift is a dashed "Swapped" chip with "now Marcus" in the giver's cell and a solid "Primary" chip with "was you" in the taker's, so a swap shows in words and shapes, never only a shade.

What does the mute switch change?

In the last row, your alerts: "On" for every day you are primary or backup, and on the day you handed over, "Muted" while the switch is on or "On" when it is off, because until you mute it your phone would still be paged. The status line says which, in words, after each change. Nothing is sent to a paging service.

How does it look on a phone?

The header's button drops under the sentence and the week scrolls sideways inside its named region, with each person's name pinned at the start so the cells keep their row. The region is a tab stop, so it also scrolls from the keyboard. The full names are left out and the first names stay.

Does the week read left to right in every language?

Yes, on purpose: a week is a time axis, so the table stays left to right in a right-to-left page, with the pinned name column at its start. Names and dates are isolated so they keep their order.

  • Pro

    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.

  • Pro

    Alert Rules Settings

    Alerts and audit

    An 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

    Time Off Approved Success

    People and approvals

    A confirmation page for approved leave: a read-only month grid with the days off marked as one run, the allowance as a three-part bar with the days left, and three automations as switches that change the page and say so.

  • Pro

    A role change confirmation inside an app panel: the role before and after, who changed it and when, how many permissions were gained and lost, and a table of eight capabilities with the new ones marked.

  • Pro

    Signed Out Devices Success

    Security and access

    A confirmation panel for signing out every other session: a row of marks for how many sessions remain, the four devices with a state each and a ghost Sign out here too that signs this device out on the page.

  • Pro

    A confirmation page for chosen benefits: a ledger of three plans with who each covers, what the employer pays and what you pay each pay period, and a twelve-week strip from today to the day cover starts with the enrolment deadline marked.