angelolamonaca

Scheduler

Component

About

A calendar scheduler for React that shows events in month, week, day, agenda and resource-timeline views, with drag-to-move, resize, keyboard navigation and time-slot selection for booking new events.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scheduler to your project and fits it to your theme.

Code

How Scheduler is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import Scheduler from "@/components/ui/scheduler";
import type { NuiSchedulerEvent } from "@needless-ui/core/scheduler";
import { useState } from "react";

const initial: NuiSchedulerEvent[] = [
  {
    id: "standup-mon",
    title: "Standup",
    start: "2026-11-02T09:00",
    end: "2026-11-02T09:15",
    tone: "neutral",
  },
  {
    id: "standup-tue",
    title: "Standup",
    start: "2026-11-03T09:00",
    end: "2026-11-03T09:15",
    tone: "neutral",
  },
  {
    id: "standup-wed",
    title: "Standup",
    start: "2026-11-04T09:00",
    end: "2026-11-04T09:15",
    tone: "neutral",
  },
  {
    id: "standup-thu",
    title: "Standup",
    start: "2026-11-05T09:00",
    end: "2026-11-05T09:15",
    tone: "neutral",
  },
  {
    id: "standup-fri",
    title: "Standup",
    start: "2026-11-06T09:00",
    end: "2026-11-06T09:15",
    tone: "neutral",
  },
  {
    id: "design-review",
    title: "Design review",
    start: "2026-11-03T10:00",
    end: "2026-11-03T11:30",
  },
  {
    id: "retro",
    title: "Retro",
    start: "2026-11-06T11:00",
    end: "2026-11-06T12:00",
  },
  {
    id: "lunch",
    title: "Lunch with Ada",
    start: "2026-11-04T12:30",
    end: "2026-11-04T13:30",
    tone: "success",
  },
  {
    id: "focus",
    title: "Focus time",
    start: "2026-11-04T14:00",
    end: "2026-11-04T17:00",
    tone: "neutral",
  },
  {
    id: "interview",
    title: "Interview",
    start: "2026-11-04T15:00",
    end: "2026-11-04T16:00",
    tone: "warning",
  },
  {
    id: "release",
    title: "Release",
    start: "2026-11-05T16:00",
    end: "2026-11-05T17:00",
    tone: "danger",
  },
  {
    id: "conference",
    title: "Conference",
    start: "2026-11-04",
    end: "2026-11-04",
    allDay: true,
  },
];

export default function Default() {
  const [events, setEvents] = useState<NuiSchedulerEvent[]>(initial);
  return (
    <div className="w-full">
      <Scheduler
        events={events}
        defaultDate="2026-11-02"
        editable
        selectable
        style={{ height: 600 }}
        onEventChange={({ event, start, end }) =>
          setEvents((list) =>
            list.map((e) => (e.id === event.id ? { ...e, start, end } : e)),
          )
        }
        onSlotSelect={({ start, end }) =>
          setEvents((list) => [
            ...list,
            { id: crypto.randomUUID(), title: "New event", start, end },
          ])
        }
      />
    </div>
  );
}

Dependencies