shadcn.io is not affiliated with official shadcn/ui
Lecture Schedule Calendar Block for Solid
A university week as five day tabs with an hours bar each, listing the chosen day's lectures with room, lecturer, a room-change note and a live status of Done, Now or Next worked out from the fixed time, with a switch to hide finished lectures.
Installation
Overview
Give students their week and what is on at this moment with this lecture schedule for Solid with Ark UI. A hairline frame with a plus mark on each corner holds five day Tabs, Monday to Friday, and each tab carries a small bar for how many hours of lectures that day holds, so a heavy day shows before you open it. The chosen day, Wednesday to start with, lists its lectures with the time, title, room and lecturer. A room that changed says so ("Room changed, was Lab 2"), and every lecture has a live status worked out from the typed times and the fixed "now" of 09:30: Done once it has ended, Now with "Ends in 25 min", Next with "Starts in 2 h 30 min" and Later for the rest, while earlier days are done and later days say how many days away. A Switch hides the finished lectures and an Empty state takes their place when none remain, in a list that keeps the same height either way. It's built from Tabs, Switch, Badge, Empty and Guides, with a CSS entrance only. For campus apps, course pages and any timetable that needs to say what is on now.
FAQ
How do I add my lectures?
Edit LECTURE_LINES. Each line is day | start | end | title | room | lecturer | room it moved from, with the day as 0 for Monday to 4 for Friday and times as 24-hour wall-clock times. Leave the last field empty when the room did not change. The bars, the hours under each tab, the statuses and the count of room changes are all worked out from these lines.
How are the statuses worked out?
phaseOf compares each lecture with AS_OF. A lecture on an earlier day, or one that ended before the time, is Done; one that has started and not ended is Now, with the minutes to its end; the first one still to start today is Next, with the minutes to its start; every other lecture is Later. Nothing reads the clock, so the block looks the same at any hour.
Does hiding finished lectures change the layout?
No. The list sits in a box as tall as four lectures, so turning the switch on or off, or changing day, never moves what is below it. If every lecture of a day is hidden, an empty state names the day and says how to bring them back.
Why is it always Wednesday at 09:30?
AS_OF is the one moment the block treats as now. To follow the real time, set it from your own clock or server, and make sure the week in THIS_MONDAY matches the lectures you load.