shadcn.io is not affiliated with official shadcn/ui
Set Reminder Dialog Block for React
A to-do list with its reminder dialog shown open: five quick chips, an inline calendar and a time in quarter hours, repeat and notify choices, and one plain sentence that always reads the choice back.
Installation
Overview
Set a reminder by saying when, or by picking, with this dialog for React with Base UI. It opens from the Tasks page of Dingleaf, a to-do app: the page's header holds an outline Remind me Button, and the list, five tasks each with a bell button, is drawn under a soft scrim inside a hairline frame with a plus mark on each corner. The Dialog has a name in an Input, five chips in a Toggle Group (In 1 hour, This evening, Tomorrow 9:00, Next Monday, Pick a date) that fill the day and the time, an inline Calendar folded under the day, a time in quarter hours from a Select, a repeat Select (never, daily, weekly or monthly) and push and email Checkboxes. Under them one sentence always reads the choice back: "Reminds you on Mon 12 Oct at 09:00, then every week by push and email." Set reminder is the only Shine Button; it puts a bell tag with the day on the first task. Every day and time comes from a typed "now", Friday 9 October at 08:40. For preview the dialog is drawn open in place when the page loads; the header's button opens the real dialog.
FAQ
Why is the dialog already open, and what do I keep?
So you can see it without a click. On load the dialog is a copy drawn in place over the page: a native dialog element that isn't modal, so nothing is trapped, hidden or focused, and the page around the preview keeps working. The Remind me button opens the real Dialog, modal, with its focus trap, Escape and focus return, and the copy stays closed until a reload. Both show the same ReminderFields component and share the block's state. In your app keep the Dialog and drop the copy: the "in-place" state, the scrim and the dialog element inside the frame.
How do the chips and the pickers relate?
They are one choice shown two ways. A chip sets the day and the time: from the typed 08:40, In 1 hour is today at 09:45 (reminders go off on the quarter hour), This evening is today at 18:00, Tomorrow 9:00 is Saturday and Next Monday is 12 October. Changing the day or the time by hand lights Pick a date unless the pair happens to match a chip, and Pick a date opens the calendar. The sentence always reads whatever is chosen, with "today" and "tomorrow" in words and other days by name, and it is said once, 600 ms after you stop changing things, and only when it changes.
What does Set reminder refuse?
A missing name, no way to be reminded (push, email or both) and a time that has already passed today at the typed 08:40. The reason appears in the line under the sentence, reserved so nothing moves, and focus goes to the field it is about. Once you change anything the reason clears.
What stays local, and how do I wire it for real?
Everything. No notification will fire: Set reminder keeps the reminder in this page's state, puts a bell tag with the day on the first drawn task and says so in the polite status. The button then reads Update reminder. In your app send the name, the day, the time, the repeat and the ways to your server, which owns the schedule and sends push and email; the times here are in the person's own zone, with no conversion.
Is it accessible from the keyboard?
Yes. The real dialog is named by its title and described by its sentence, focus starts on the name, and Escape, Cancel and the close button return focus to Remind me. The chips are one group you move through with the arrow keys, the day button says whether the calendar is open (aria-expanded), the calendar is a real grid, and choosing a day returns focus to the button. The trigger is passed to DialogTrigger through render, and the dialog is controlled with open and onOpenChange.
How does it look on a phone?
The copy shown on load docks to the foot of the page as a bottom sheet with its buttons pinned and the form scrolling above them, name first. The chips go two to a row, the day and the time stack, and the sentence has room for three lines so it never jumps. The real dialog keeps the Dialog's own phone layout, a sheet stuck to the bottom of the screen.
Related
- Pro
Schedule Meeting Dialog
Time and schedulingA month page with its new event dialog shown open: a title, a day from a folded calendar, a start time and length, guest emails as tags, and a day timeline that moves with the time and warns when the meeting clashes.
- Pro
Meeting RSVP Dialog
Time and schedulingA team calendar's week with its reply dialog shown open: the event, a three-way Going, Maybe or Can't go answer, an optional note, and the guests by answer with their counts, moving as you choose.
- Pro
A team chat inbox with a settings dialog shown open: a real table of notification kinds by channel with a switch in every cell, mixed-state column masters, reset and save, and a chip on the inbox that reports the saved count.
- Pro
A social scheduler's content calendar with its scheduling dialog shown open: a month to pick a day, best times plus any half hour, a zone that restates the time elsewhere, three channel switches, and a Schedule post button that drops a chip into the week behind it.
- Pro
Pomodoro Timer Dialog
Time and schedulingA focus timer's Today page with its dialog shown open: a Focus, Short break and Long break switch, a ring that fills with the digits inside it, Start and Pause, four session dots and durations that apply at the next start.
- Pro
An analytics page with a date-range dialog shown open: six presets worked out from a fixed day, a calendar for a custom range, start and end fields that check each other, a compare switch and a foot that counts the days.