Installation

Two ways in — the npm package, or the source registry that lands the whole calendar in your repo.

kloq ships two ways. npm gives you the compiled, typed build. The source registry copies the whole calendar — engine, views, themes, design mode — into your repo as MIT-licensed source you can edit, through one shadcn CLI command. Same component, same API; the difference is whether the code lives in node_modules or in your tree.

npm — the compiled build

terminal
npm install kloq

react ≥ 19 and Tailwind CSS v4 are assumed. Import the stylesheet once, in your root layout — CSS imported inside a page or component only reaches that route:

app/layout.tsx
import "kloq/styles.css";

Registry — edit the source

The registry delivers the same calendar as source files under components/kloq/, so a custom slot is just another file and a spring tweak is a line you can edit. The MIT License is included in the registry payload. Point the CLI at the public registry once:

components.json
terminal
npx shadcn@latest add @kloq/kloq

The CLI lands the library under components/kloq/ and installs its five npm dependencies (@base-ui/react, class-variance-authority, clsx, lucide-react, tailwind-merge). Import paths change from kloq/... to @/components/kloq/...:

app/layout.tsx
import "@/components/kloq/styles/kloq.css";

Light and dark

kloq follows a dark class on <html> — the coss / shadcn convention — and leaves that class alone unless you call setScheme. If your app runs no scheme convention at all (no dark or light class on <html>), the calendar follows the OS on its own, scoped to itself, so it never paints white on a dark page.

Requirements

React 19+, Tailwind CSS v4, a browser with pointer events and WAAPI (every evergreen browser), and a container with a real height — <Kloq> is h-full and renders into whatever box you give it. There is no window-level layout: two calendars on one page work fine.

Last updated