Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Time Off Calendar Team Block for React

A four-week grid of Monday to Friday for a shift-scheduling company, with the avatars of people away in each day, a coverage row under every week, the thinnest week flagged and the reasons listed in plain words.

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

A team time-off calendar for React with Base UI, for Bellwood, a shift-scheduling company. A split puts the copy and the reasons at the start and a framed grid at the end, divided by a hairline. The grid is a real table of four weeks (this week, next week, week 3, week 4) by Monday to Friday, with no dates, so it is never out of date. Each day holds the small avatars of the people away, and a coverage row under every week counts them ("2 away" or "All in"). Only the week with the fewest people in is flagged, and the header says which one and how many are in on its busiest day. Under the header the nine absences are listed in plain words: who, why and which days. On a phone the grid comes first and scrolls sideways if it must, and the reasons follow it. It's built from Table, Avatar Group, Badge, Avatar and Guides, with your theme's tokens for every colour. For a team page, a manager's view or a staffing page. The people and the absences are invented.

FAQ

How do I change who is away?

Edit ABSENCES at the top of the file: each entry is a name, a reason, a week (0 for this week) and the first and last day (from and to, 0 for Monday). STAFF is how many people are on the rota in all. The grid, the coverage counts, the flag and the reasons list are all worked out from ABSENCES.

Why are there no dates?

The four weeks are always the coming four, so labelling them "This week", "Next week", "Week 3" and "Week 4" is true on any day. Add dates by computing them from the current Monday in the browser after the page loads; the table doesn't need them to work.

How is the flagged week chosen?

It is the week with the most people away on any one day, so the fewest people in. In the example that is Week 3, with 3 of 12 away on its busiest days, and only that week carries the "Fewest in" badge. A tie goes to the earlier week.

Is it a real table, and how does the keyboard work?

Yes: a table with a name, weeks as row headers and days as column headers. The avatars are decoration; each day also carries the names of the people away as text for screen readers ("No one away" when nobody is). It's a native table. Its scroll area is a labelled region that takes Tab, so the arrow keys can scroll the grid on a narrow screen.

How does it fit on a phone?

The grid keeps a minimum width and its area scrolls sideways, with the week column first. The header comes first, then the grid, then the reasons list, so the reasons sit under the grid as they do under the header on a desktop.

  • Pro

    Status Board Team

    Hours and places

    A three-column board of Online, In focus and Away for a project tracker's team, each person with their activity and local time, and a Set my status group that moves one 'You' avatar between the columns.

  • Pro

    Hybrid Week Desks Team

    Hours and places

    A coworking company's hybrid week as a table: eight people by Monday to Friday, each cell a desk code like BER-214 or Remote, a who-is-in count under each day and a select to look at one office.

  • Pro

    Status Filter Team

    Hours and places

    A live-chat widget's eight people in rows under a ruled pill filter (All, Online, Away, Busy) with counts, each row showing a presence dot, what they are doing and when they were last seen.

  • Pro

    Hour Scrubber Team

    Hours and places

    A framed slider over the 24 hours of the day in UTC, above nine people in rows that show who is working at that hour with their local time, a day strip and a live count.

  • Pro

    Weekly office hours of a pair-programming service: five day tabs, each with three engineers' half-hour slots as pills, and a single Shine Button that reads 'Book Thu 14:00 with Noor' once a slot is picked.

  • Pro

    Month Calendar Events About

    Culture and values

    The standing events of an event hosting company drawn as a month at a glance with no month name: a seven by five table of days with the recurring events marked by shape, and the same events as a dated agenda with a Subscribe link.