# kloq (kloq) > A React calendar component obsessed with micro-perfection: hand-tuned drag > physics, a design mode that annotates its own craft, a ⌘K command palette, > RRULE recurrence and ICS in both directions. Ships two ways — `npm install > kloq` for the compiled build, or the shadcn registry (`npx shadcn add > @kloq/kloq`) which lands the whole library in your repo as source you can edit. The whole manual as one file: https://coss.com/kloq/llms-full.txt ## Site - [Home](https://coss.com/kloq): what the calendar is, the interactions, and the two ways to install it. - [Live demo](https://coss.com/kloq/demo): the full calendar backed by localStorage — drag things around. - [Installation](https://coss.com/kloq/docs/installation): install from npm or add the source through the registry. ## Getting started - [Overview](https://coss.com/kloq/docs): One React component and the manual for it — installing, configuring and customising kloq, with the calendar running live. - [Installation](https://coss.com/kloq/docs/installation): Two ways in — the npm package, or the source registry that lands the whole calendar in your repo. - [Quick start](https://coss.com/kloq/docs/quick-start): A working calendar in one component: container, toolbar, defaults, and where to go next. - [Playground](https://coss.com/kloq/docs/playground): Every prop on knobs: a live calendar and a snippet that rewrites itself as you flip them. ## Examples - [Examples](https://coss.com/kloq/docs/examples): One component, many products — each example a live calendar with its source beside it, grounded in the real API. - [Booking calendar](https://coss.com/kloq/docs/examples/booking-page): A Cal.com-style availability picker — busy time hatched and refused by constraints, click a free slot to book. - [Team calendar](https://coss.com/kloq/docs/examples/team-schedule): Two accounts, five calendars, colour inherited from the calendar — with a calendar list that toggles each one. - [Room booking](https://coss.com/kloq/docs/examples/room-booking): Four meeting rooms as timeline lanes — drag to book, drag across rooms to reassign, drag an edge to resize. - [Shift scheduler](https://coss.com/kloq/docs/examples/shift-roster): Five people, one week, as timeline lanes — drag to schedule, drag across rows to reassign a shift to someone else. - [Conference agenda](https://coss.com/kloq/docs/examples/conference-agenda): A public, read-only programme in 24-hour time with tracks as locations and a details sheet on click. - [Calendar in an app layout](https://coss.com/kloq/docs/examples/app-shell): The calendar as one route of a product — sidebar nav, a header built from useKloq(), and a container that gives it a real height. - [Optimistic server sync](https://coss.com/kloq/docs/examples/server-sync): Every change is committed to a fake server with latency and a reject switch; a rejection springs the block back to where it was. - [Lazy-load by date range](https://coss.com/kloq/docs/examples/range-fetching): A controlled calendar that only holds what onRangeChange has fetched, merged page by page, with edits written back to the server copy. - [View and date in the URL](https://coss.com/kloq/docs/examples/url-state): Controlled view and date mirrored into the query string, so a link opens the same week and the browser's back button steps the calendar. - [Custom persistence adapter](https://coss.com/kloq/docs/examples/custom-persistence): Uncontrolled events saved through your own adapter — sessionStorage with a versioned payload and a per-tenant namespace, plus a tenant switcher. - [ICS import and export](https://coss.com/kloq/docs/examples/ics-import-export): Drop a .ics feed onto the calendar, then export what is on screen back out as a file. - [Custom event rendering](https://coss.com/kloq/docs/examples/custom-event-block): A deploy pipeline drawn with its own EventBlock (status stripe, progress bar, mono duration), with the engine contract honoured so drags still work. - [Multiple time zones](https://coss.com/kloq/docs/examples/multi-timezone): Draw the grid in any zone, add London / New York / Tokyo gutter columns, and keep each event's authored zone. - [Linked month and day views](https://coss.com/kloq/docs/examples/linked-calendars): A month overview beside a day view, both controlled by the same date — click a day on the left, it opens on the right. - [Recurring events (RRULE)](https://coss.com/kloq/docs/examples/recurring-events): Weekday standups, a fortnightly review and a monthly payday — as RRULE strings, expanded live, edited this / following / all. - [Custom ⌘K commands](https://coss.com/kloq/docs/examples/commands-and-keys): Domain commands in the palette, Vim-style keys on the keymap, and a row that lists the effective bindings. - [Natural-language event entry](https://coss.com/kloq/docs/examples/quick-add-planner): Type "lunch with Sam tomorrow 1pm" into a box above the grid; the parser underlines what it understood and the event lands. ## Registry - [The registry](https://coss.com/kloq/docs/registry): The calendar and its add-on blocks, delivered as MIT-licensed source by the shadcn CLI. ## Core concepts - [Events](https://coss.com/kloq/docs/events): CalEvent: the discriminated union on allDay, real instants, colors, attendees, and every optional field. - [Controlled state](https://coss.com/kloq/docs/controlled-state): view, date and events as controlled or uncontrolled props, plus onRangeChange and controlled undo/redo. - [Persistence](https://coss.com/kloq/docs/persistence): The PersistenceAdapter contract, the localStorage default, and the versioned payload migration. - [Optimistic sync](https://coss.com/kloq/docs/optimistic-sync): The onCommit seam: changes land instantly, rejections spring back. KloqChange, batching, and wiring a real API. - [Views & navigation](https://coss.com/kloq/docs/views): Day, week, n-day, month, agenda, year — what each shows, what prev/next step by, and the responsive collapse. - [Resource timeline](https://coss.com/kloq/docs/timeline): Rooms, staff or machines as rows along a horizontal time axis — drag to book, drag across rows to reassign, drag an edge to resize. - [Resources & lanes](https://coss.com/kloq/docs/resources): The row-binding seam for the timeline — laneOf, assign, byResourceId, and why a row is whatever the host says it is. - [Constraints](https://coss.com/kloq/docs/constraints): Refuse time on the grid: bounds, per-date rules and per-event vetoes that every gesture honours. ## Customization - [Theming](https://coss.com/kloq/docs/theming): Nineteen themes across three families, light and dark schemes inside every one, and a zero-flash SSR restore script. - [Slots](https://coss.com/kloq/docs/slots): Ten swappable visual pieces with typed contracts. The engine, grid math and craft-bus stay fixed; overrides plug into them. - [Toolbar & chrome](https://coss.com/kloq/docs/chrome): Kloq.Toolbar, Kloq.Nav, Kloq.Reset and useKloq() — the app bar as opt-in composable parts. - [Settings dialog](https://coss.com/kloq/docs/settings): The settings module — the optional preferences dialog, its KloqPreferences model, and the account helpers behind it. ## Interaction - [Command palette](https://coss.com/kloq/docs/command-palette): ⌘K ships with the component — an open command registry, whole-store event search, and a natural-language "move to…". Your commands rank alongside the built-ins. - [Keyboard](https://coss.com/kloq/docs/keyboard): The scoped keyboard layer — remappable mnemonics via the keymap prop, the ? sheet that can never lie, and what is deliberately fixed. - [Quick add](https://coss.com/kloq/docs/quick-add): Natural-language event entry: parseQuickAdd, the grammar it understands, and the offsets that power the live underline. - [Quick add input](https://coss.com/kloq/docs/quick-add-input): The ⌘K quick-add field as a standalone component: the live underline, the preview line, and a commit you own. - [Design mode](https://coss.com/kloq/docs/design-mode): ⌥D: a calendar-aware inspector, live spring tuning with slow motion, geometry overlays, and a contrast-scoring theme picker. ## Advanced - [Time zones](https://coss.com/kloq/docs/time-zones): displayTimeZone, extra gutter columns, per-event authored zones, and the pure Intl-backed zone layer. - [Recurrence](https://coss.com/kloq/docs/recurrence): RRULE on CalEvent, the expansion seam, occurrence placements, and this/following/all edit semantics. - [ICS import & export](https://coss.com/kloq/docs/ics): toICS and downloadICS out, parseICS in — RFC 5545 both directions, pure, and never throwing. - [API reference](https://coss.com/kloq/docs/api): Every export of the copied kloq source — the root module, themes, settings and design-mode — grouped by area.