Skip to main content
Clever Ops

Class Timetable

A weekly timetable with gym-wall energy, bold condensed class names, mono start times, coach lines, five-dot intensity marks, and a spots-left state that makes you book now.

Preview & code

Loading Class Timetable preview

Installation

pnpm dlx shadcn@latest add @cleverui/class-timetable

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { ClassTimetable } from '@/components/blocks/class-timetable'
Exampletsx
'use client'

import { ClassTimetable } from '@/components/blocks/class-timetable'

export default function ClassTimetableDemo() {
  return (
    <ClassTimetable
      eyebrow="Earn the hour"
      heading="This week"
      spotsThreshold={5}
      onBook={() => {}}
      days={[
        {
          day: 'Monday',
          classes: [
            {
              time: '05:30',
              name: 'Engine Room',
              coach: 'Dana Cole',
              intensity: 4,
              duration: '45 min',
              spotsLeft: 3,
            },
            {
              time: '12:00',
              name: 'Strength Lab',
              coach: 'Marcus Reed',
              intensity: 3,
              duration: '60 min',
              spotsLeft: 11,
            },
            {
              time: '18:15',
              name: 'Hyrox Prep',
              coach: 'Ava Okonkwo',
              intensity: 5,
              duration: '50 min',
              spotsLeft: 0,
            },
          ],
        },
        {
          day: 'Wednesday',
          classes: [
            {
              time: '06:00',
              name: 'Barbell Club',
              coach: 'Marcus Reed',
              intensity: 4,
              duration: '60 min',
              spotsLeft: 4,
            },
            {
              time: '17:30',
              name: 'Conditioning',
              coach: 'Dana Cole',
              intensity: 5,
              duration: '40 min',
              spotsLeft: 8,
            },
          ],
        },
        {
          day: 'Friday',
          classes: [
            {
              time: '05:45',
              name: 'Sprint Sessions',
              coach: 'Ava Okonkwo',
              intensity: 5,
              duration: '35 min',
              spotsLeft: 2,
            },
            {
              time: '12:15',
              name: 'Mobility Reset',
              coach: 'Jules Park',
              intensity: 2,
              duration: '45 min',
              spotsLeft: 14,
            },
          ],
        },
      ]}
    />
  )
}

API reference

ClassTimetable accepts the following props.

PropTypeDefaultDescription
headingstring'This week'
eyebrowstringcoach-voice kicker, e.g. EARN THE HOUR
days*ClassDay[]
spotsThresholdnumber5spotsLeft at or under this renders the urgent accent state
onBook(cls: { day: string; time: string; name: string }) => void

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface ClassDay {
  day: string
  classes: ClassSession[]
}

export interface ClassSession {
  time: string
  name: string
  coach: string
  /** 1–5 intensity level */
  intensity: number
  duration?: string
  spotsLeft?: number
}

Frequently asked questions

How do I install the Class Timetable component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/class-timetable`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Class Timetable require?

Class Timetable uses motion on top of React and Tailwind CSS. You don't need to install it manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Class Timetable to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services