Ballmac UI home

On-call 1: weekly rota

An on-call rota for the week: who is on call now per layer, a grid of days by primary and secondary, days nobody covers called out in words, and a selected shift you can take or ask the person on it to swap.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/oncall-1

Usage

Example: oncall-1-demo.tsx
"use client"

import { Oncall1 } from "@/components/ballmac/blocks/oncall-1/oncall-1"

export default function Oncall1Demo() {
  return <Oncall1 onTake={() => new Promise((r) => setTimeout(r, 400))} onRequestSwap={() => new Promise((r) => setTimeout(r, 400))} />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton for the banner and the grid under the real heading, announced as loading.

    state="loading"
  • No rota yet

    Says no rota exists yet; emptyState sets the copy and can add a button.

    state="empty"
  • Could not load

    An alert saying nobody was changed, with Try again (onRetry).

    state="error"

Dependencies

Use with AI

A weekly on-call rota. <Oncall1 days={[{ label: 'Mon 20', full: 'Monday 20 October' }]} layers={[{ id, name: 'Primary', people: ['Priya Shah', null, ...] }]} todayIndex={4} handover='09:00' me='Priya Shah' onTake={(shift) => Promise} onRequestSwap={(shift) => Promise} />. null in people means nobody; uncovered shifts are listed in words. Select a shift to take it or ask for a swap. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI On-call 1: weekly rota (@ballmac/oncall-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • An operations page showing who gets paged this week
  • A team calendar for support or engineering cover

Not for

  • A shift roster for hourly staff; use roster-1
  • A calendar of events; use calendar-1

Registry JSON: https://ui.ballmac.com/r/oncall-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.