Skip to content
synccn

Week Schedule

New

Week calendar with timed events and a live now-line.

MonTueWedThuFri
9am10am11am12pm1pm2pm3pm4pm

Installation

$ pnpm dlx shadcn@latest add @synccn/week-schedule

First time in this project? Connect synccn with one command.

Usage

import { WeekSchedule } from "@/components/ui/week-schedule";<WeekSchedule events={events} />

API reference

Generated from the component's TypeScript types, so it always matches the code.

WeekSchedule

Week view calendar. events: [{ day: 0–6 (Mon–Sun), start: 9.5, end: 11, title, tone? }] Shows a live "now" line on today's column.

  • eventsrequired
    ScheduleEvent[]

    Events to place.

  • startHour
    number

    Default 8

    First hour shown.

  • endHour
    number

    Default 18

    Last hour shown.

  • hourHeight
    number

    Default 44

    Pixels per hour.

  • days
    string[]

    Default ["Mon", "Tue", "Wed", "Thu", "Fri"]

    Column labels.

  • onEventClick
    (event: ScheduleEvent) => void

    Called when an event is clicked.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

No ARIA roles, key handling or motion settings in its source. It renders plain elements, so its accessibility comes from the content and labels you give it.