shadcn.io is not affiliated with official shadcn/ui
Centered Demo Schedule Hero Block for React
A showcase centered hero for a demo booking: a headline, then a scheduler in a hairline frame with a split divider between day and time, and one Shine Button to book the slot.
Installation
Overview
A centered hero with a demo scheduler as its feature. An announcement pill (hidden on phones), a headline and a sentence lead into a scheduler in a hairline frame with + marks on its corners. A split divider separates the strip of next week's five working days from the grid of six start times, and a band across the foot of the frame sums up the chosen slot beside the Shine Button, the one primary action. The chosen day and time fill with the foreground color. A ghost button under the frame offers a free trial instead. It's built from Guides, Segment Group, Announcement, Status, Shine Button and Button, with Lucide icons, Tailwind CSS and a CSS entrance. The fictional product is Ferry, a support inbox. For sales demo pages, SaaS trial walkthroughs, consultations and any product where booking a call is the main way in.
FAQ
How do I change the days and the times?
Edit the two arrays at the top of the file. WEEKDAYS is the day strip: each day's value, its short label on the tile and its long name for screen readers. TIMES is the grid of start times, shown as written. The day and time chosen at first are the component's initial state, wed and 10:30: keep them among the values, or nothing starts chosen.
Where do the dates come from, and why aren't they in the server HTML?
They're worked out in the browser, from the visitor's own clock: the strip is always next week's Monday to Friday, and the frame's corner shows that week's month and year. A date rendered on the server would go stale, or disagree with the visitor's time zone, so the server HTML shows the weekdays with a dash for each date and Next week in the corner, and the dates fill in as soon as the page loads.
How do I connect it to my booking service or calendar?
Load the open slots from your availability endpoint in place of TIMES, per day if they differ, and point the Book this slot link at your booking page with the chosen date and time in its query string, or turn it into a button that posts them to your API. The block already keeps the chosen day and time in state and builds the summary from them, so that's where to read them.
How do keyboard and screen reader users pick a slot?
The days and the times are two radio groups, named Day and Start time, in your time zone. Tab moves into a group, the arrow keys move the choice, and each option is read in full: Wednesday, October 21, not Wed 21. The headline is the block's one h1. The Book this slot link carries the chosen slot in its accessible name, so it makes sense on its own in a list of links.
How does the scheduler fit on a phone?
The pill is hidden below sm so the scheduler and its button stay on the first screen. The five day tiles share the frame's width down to 320 px, the times stay in three columns, the split divider becomes a rule between the two, and the summary sits above a full-width Book this slot button. A new choice fills with a short color transition, which is turned off under reduced motion.
When should I use this hero instead of a split calendar booking hero?
Use this centered layout when the headline carries the page and booking is the way in, with the scheduler under the message rather than beside it. Use a split calendar booking hero when the calendar deserves as much room as the copy.
Related
- Pro
Split Calendar Booking Hero
Interactive demosA reverse split hero for a scheduling tool: a working booking page in a hairline frame with plus marks on its corners (step through weeks, pick a day and a time) beside a headline, a Shine Button and three ticks.
- Pro
Centered Multi Step Form Hero
Signup and waitlistA centered signup hero whose form is a three-step wizard in a card in card, account, plan and payment, that checks each step's fields before the next and ends on a confirmation.
- Pro
Centered Inline Email Signup Hero
Signup and waitlistA short centered waitlist hero with an email field and a Shine Button on one row inside a framed box, a confirmation in place, an avatar row and two trust points.
- Pro
Centered ROI Calculator Hero
PricingA centered showcase hero with two actions over a framed calculator: a team-size slider beside an estimate of the annual savings, which rolls to each new figure.
- Pro
A centered pricing hero with Free and Pro side by side in one hairline band, the Pro cell tinted and holding the Shine Button, and a plan switch on phones.
- Pro
Centered Email Capture Form Hero
Signup and waitlistA compact centered newsletter hero with the email field in a full-width band between two hairlines: a Shine Button subscribes, then a confirmation replaces the form, over a row of subscriber proof.