Ballmac UI home

Gantt 1: project timeline

A project timeline: bars placed by real dates with a progress fill, milestones, dependency arrows, a today line, three zoom levels, a sticky task column, a details panel and a table of the same data for screen readers.

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/gantt-1

Usage

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

import { Gantt1 } from "@/components/ballmac/blocks/gantt-1/gantt-1"

export default function Gantt1Demo() {
  return <Gantt1 defaultSelectedId="t4" />
}

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

    A skeleton chart under the real heading, announced as loading; zoom and Today are disabled.

    state="loading"
  • No tasks yet

    Says the plan draws itself once tasks have dates; emptyState sets the copy and can add a button.

    state="empty" (or tasks={[]})
  • Could not load

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

    state="error"

Quality scorecard

7/7

Every applicable check passes

Measured in Chromium 153.0.8010.12 on October 19, 2026, on version 1.0.0, across 6 examples.

How we measure
  • Passed: Accessibility scan

    No serious or critical issues in light and dark, on a phone and a desktop (axe-core 4.13.0, WCAG 2.1 AA and best-practice rules).

  • Passed: Small screens

    No sideways scrolling at 360, 390 or 1280 px wide.

  • Passed: Reduced motion

    Every endless animation stops when the visitor asks for less motion.

  • Not applicable: Right to left

    Not mirrored by design: A timeline runs left to right in every language, like a chart: dates only make sense in one direction.

  • Passed: Clean console

    No console errors or React hydration errors while loading.

  • Passed: Keyboard

    46 tab stops, each showing a visible change when it takes focus. 3 documented keys.

  • Passed: Loading, empty and error

    Ships loading, empty, error states, each with an example.

  • Passed: Automated tests

    Covered by gantt-1.test.tsx.

  • For information: Footprint

    7.5 KB of source (gzip) in 1 file. Installs lucide-react, motion.

Automated checks find a subset of problems and do not replace testing with a screen reader and a keyboard in your own app. What they miss.

Dependencies

Use with AI

A Gantt chart. <Gantt1 tasks={[{ id, name, start: '2026-10-05', end: '2026-10-16', progress: 0..1, group, owner, dependsOn: ['id'], milestone }]} today="2026-10-18" defaultScale='days' | 'weeks' | 'months' defaultSelectedId locale onSelect />. Status is worked out for you: done at progress 1, late when the end date has passed, in progress when it has started, planned otherwise. Pass today yourself (an ISO date); the block never reads the clock. A milestone has the same start and end. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Gantt 1: project timeline (@ballmac/gantt-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Showing a project plan with dates, progress and dependencies
  • A read-only schedule overview in a project tool or a client report

Not for

  • A board of cards by status (use kanban-1)
  • Booking rooms or people by the hour (use calendar-pro-1)
  • A simple list of dated items (use timeline or tasks-1)

Registry JSON: https://ui.ballmac.com/r/gantt-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.