Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Time Off Approved Success Block for React

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.

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

Close the loop on a leave request with this confirmation page for React with Base UI. It's the page Leaveloft, a time-off tracker, shows once leave is approved: the page's side rails and one band, split in two with the picture first. The first half is November 2026 as a read-only month grid with the four days off marked as one solid run and the first day back outlined, with a legend in words. The second half is a check in a tile, the heading, who approved it, the allowance as a bar in three parts (used before, booked now, left) with the days left written beside it, and three automations as Switches: an out-of-office reply, the team calendar and a chat status. The one Shine Button, View the calendar, sits right under the heading. The frame's lines are drawn by Guides. For leave and absence tools, approvals and any confirmation that has dates in it.

FAQ

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

Nothing was approved or switched on. The approver, the dates, the allowance and the three automations are typed sample data, and a switch only changes this page, saying so in a polite status line ("Chat status is on in this demo. Nothing was changed."). To wire it, build the leave dates, the approver and the allowance (in half days) from your leave record and send each switch's change to the service it controls.

Is the month a real calendar, and is it accessible?

It is a native table with a caption, column headings with the weekday's full name and one cell per day, drawn from a typed year and month, so it reads the same everywhere. It is read-only on purpose: nothing in it takes focus. A screen reader hears each day's number, and the marked days are followed by "time off" or "first day back"; the marks are never only a shade, because the first day back is outlined, not filled, and the legend is in words. The page does not use the catalog Calendar, which is for picking days.

Where do 14.5 days left come from?

From three typed numbers in half days: the year's allowance (50), what was used before (13) and what this leave books, counted as the working days between the first and last day off (4 days, so 8). The days left are the allowance minus the other two, the bar's parts are their shares and the sentence under it repeats them in words. The bar is hidden from assistive technology on purpose, since the text carries the same numbers.

What do the switches do?

Each is a real Switch with a name, and flipping it updates the count beside the heading ("2 of 3 on") and the status line. Nothing is sent: they stand for the settings you would keep for each automation. In the demo the out-of-office reply and the team calendar start on and the chat status starts off.

How does it look on a phone?

The primary stays right under the heading and is full width, so it is on the first screen, and the calendar goes under it and above the balance and the switches, as in the reading order. The short list of facts is left out, since the heading's sentence already says who approved it and the dates. Each automation keeps its name and switch and drops its description on a phone, and the month's days get a little shorter so all five weeks fit.

  • Pro

    A vacation responder settings panel that leads with the sentence the settings amount to, a form with a subject, a message with variable chips, two date fields and a once-per-sender rule, beside a framed drawn email filled from a sample sender.

  • Pro

    Application Pipeline Success

    People and approvals

    A confirmation page for a job application: the role, place and reference with a copy button, and a vertical list of four hiring stages where each one opens to say what happens in it and how long it usually takes.

  • Pro

    A meeting about to start in a scheduling app: a catalog Timer counting down to it with a Pause, the agenda with start times, who is coming with an RSVP, Join call, Snooze 5 minutes and a real calendar file to download.

  • Pro

    Approval Chain Success

    People and approvals

    An expense-report confirmation page: the report's number, date, category and total, the approval chain down a rail with a word for where it stands, the attached receipts, and a withdraw button that says so in the chain.

  • 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.

  • Pro

    Invite Accepted Roster Success

    People and approvals

    A confirmation page for a teammate joining: who invited them and when, how many seats are used, and a roster where the new member's row is marked Joined and holds a role select that changes the role sentence below.