The calendar parts together, with made-up events in the week you open the page: a day, work week or week on TimeGrid, a Calendar in a popover to jump to a date, New event and a press on an empty slot that open a dialog (a sheet on a phone), an event that opens its details with Edit and Delete, and a delete you can undo from a toast. The State switcher shows an empty week and a loading state; the events, the Go to date button, the heading and the form are the demo's own. An app supplies the real ones. TimeGrid shows a day or a week, so a month is for the Calendar. Try the keyboard, a narrow window and dark mode.
A short assembly
import { useState } from "react";
import { TimeGrid } from "@/components/ouro/time-grid/time-grid";
import { TimeGridNav } from "@/components/ouro/time-grid/time-grid-parts";
import { Dialog } from "@/components/ouro/dialog/dialog";
import { Popover } from "@/components/ouro/popover/popover";
import { toast } from "@/lib/ouro/toast";
export function Schedule({ events, create, remove, restore }) {
const [date, setDate] = useState("2026-03-12");
const [slot, setSlot] = useState(null);
return (
<>
<TimeGridNav date={date} view="week" onDateChange={setDate} />
<TimeGrid label="Calendar" date={date} view="week" events={events} onDateChange={setDate} onSlotSelect={setSlot} />
<Dialog open={slot !== null} onOpenChange={() => setSlot(null)} title="New event" footer={<Button onClick={() => create(slot)}>Create</Button>}>
<TextField label="Title" />
</Dialog>
</>
);
}
