Installation
Install the package
Section titled “Install the package”npm install trud-calendar# orpnpm add trud-calendar# oryarn add trud-calendarPeer dependencies: react >=18, react-dom >=18
AI-assisted setup
Section titled “AI-assisted setup”Using an AI coding agent? Install the Agent Skill so your AI knows the full trud-calendar API — every prop, slot, hook, and pattern:
npx skills add trudapp/trud-calendarWorks with Claude Code, Cursor, Copilot, Cline, Codex, and 40+ more agents.
Tailwind v4 setup
Section titled “Tailwind v4 setup”Import the theme variables before Tailwind, and add the @source directive so Tailwind generates the required utility classes:
@import "trud-calendar/styles.css";@import "tailwindcss";@source "../node_modules/trud-calendar/dist";Without Tailwind
Section titled “Without Tailwind”If you’re not using Tailwind, just import the pre-built CSS file:
@import "trud-calendar/styles.css";Or in your JavaScript entry:
import "trud-calendar/styles.css";shadcn/ui projects
Section titled “shadcn/ui projects”shadcn v2 (Tailwind v4)
Section titled “shadcn v2 (Tailwind v4)”If your project uses shadcn v2, the calendar inherits your theme automatically. The CSS variables fall back to shadcn’s var(--background), var(--foreground), etc.
Just add the @source directive and import the styles:
@import "trud-calendar/styles.css";@import "tailwindcss";@source "../node_modules/trud-calendar/dist";shadcn v1 (Tailwind v3)
Section titled “shadcn v1 (Tailwind v3)”shadcn v1 defines CSS variables as raw HSL numbers (e.g. --border: 214.3 31.8% 91.4%), which are not valid CSS colors on their own. You’ll need to map them manually with hsl() wrappers. See the Theming > shadcn v1 section for the full snippet.