Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-gantt>

@methane-ui/datagrid~10.1 KB brotli shell + lazy engine~3.2 KB shell · lazy engine chunk

Project Gantt timeline satellite wrapping CalendarCore and @tanstack/virtual-core with task progress bars, milestone markers, and SVG dependency lines.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-gantt> (@methane-ui/datagrid)
Ready · interact with <mth-gantt>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/datagrid/gantt"></script>
<mth-gantt start-date="2026-01-01" days="14"></mth-gantt>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
tasks—ReadonlyArray<unknown>—List of project tasks with start/end dates, progress, milestones, and dependencies.
startDatestart-datestring"2026-01-01"ISO start date (YYYY-MM-DD) of the Gantt horizon.
daysdaysnumber14Total timeline days displayed.
rowHeightrow-heightnumber40Estimated row height in pixels.
showDependenciesshow-dependenciesbooleantrueRenders SVG dependency connector paths between tasks.
labellabelstring""Accessible Gantt grid label.

Events

EventDetail TypeDescription
mth-task-select{ task: unknown }Fired when a task bar or milestone is activated.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowDownbothtask row focusedmoves roving focus to next task
ArrowUpbothtask row focusedmoves roving focus to previous task
Homebothtask row focusedmoves roving focus to first task
Endbothtask row focusedmoves roving focus to last task
Enterbothtask bar focusedemits mth-task-select

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="host".lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 5 APG keyboard transitions across LTR/RTL.mth-gantt.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(empty).Conformance suite
i18nRoutes 5 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test