Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Context Menu
  • Drawer
  • Footer
  • Menu
  • Navbar
  • On This Page
  • Separator
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Container
  • Flex
  • Grid
  • Text
  • Link
  • Button
  • Form
    • AutocompleteNew
    • Checkbox
    • Color Picker
    • Date Picker
    • Date Range Picker
    • Datetime Picker
    • Datetime Range Picker
    • File Upload
    • Input GroupNew
    • NumericNew
    • Masked InputNew
    • Radio Button
    • Range SliderNew
    • RatingNew
    • Select
    • Slider
    • Switch
    • Tag InputNew
    • Text EditorNew
    • Textfield
    • Time Picker
    • Time Range Picker
  • Toggle
  • Toggle Group
  • Alert
  • Avatar
  • Badge
  • Chip
  • Empty
  • Icon
  • Popover
  • Progress
  • Skeleton
  • Spinner
  • Tooltip
  • Data Table
  • SpreadsheetNew
  • Column Filter Editor
  • Pagination
  • Pick List
  • Barcode
  • QR Code
  • Calendar
  • Table
  • Attachment
  • Overview
    • Bar
    • Bullet
    • Column
    • Dot Plot
    • Dumbbell
    • Icon
    • Lollipop
    • Radial Bar
    • Range
    • Word Cloud
    • Area
    • Bump
    • Bump Area
    • Candlestick
    • Gantt
    • Horizon
    • Line
    • Slope
    • Small Multiples
    • Stream Graph
    • Funnel
    • Gauge
    • Marimekko
    • Nightingale
    • Pie
    • Treemap
    • Waffle
    • Waterfall
    • Circular Treemap
    • Convex Treemap
    • Dendrogram
    • Sunburst
    • Barcode
    • Beeswarm
    • Box Plot
    • Density Plot
    • Histogram
    • Radial Histogram
    • Ridgeline
    • Strip Plot
    • Violin Plot
    • Categorical Scatter
    • Contour
    • Hexagonal Binning
    • Quadrant
    • Scatter
    • Heatmap
    • Matrix
    • Parallel Coordinates
    • Radar
    • Arc Diagram
    • Chord Diagram
    • Flowchart
    • Network Diagram
    • Sankey
    • Euler Diagram
    • Venn Diagram
  • Bubble
  • Marker
  • Message
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started

Charts

TwGanttChart

TwGanttChart is a Blazor Gantt chart with summary tasks, progress, milestones, dependencies and zoom levels. Drag bars to move, resize or link them.

Last updated 8 November 2026

Basic usage

TwGanttChart draws a bar per ChartTask from its start date to its end date, in the order given, so the schedule and any overlaps are visible. At the default zoom the whole plan fits the chart's width.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
ResearchStart 12 OctEnd 30 Oct
DesignStart 26 OctEnd 20 Nov
BuildStart 16 NovEnd 25 Dec
TestStart 14 DecEnd 5 Jan
12 Oct2 Nov23 Nov14 Dec5 Jan
RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" />
</TwChart>
CSHARP
@code {
    // The plan starts on the Monday six weeks ago, so today always falls inside it.
    private static readonly DateTime _planStart = DateTime.Today.AddDays(-42 - ((int)DateTime.Today.DayOfWeek + 6) % 7);
    
    private static DateTime Day(int days) => _planStart.AddDays(days);
    
    private readonly ChartTask[] _tasks =
    [
        new("Research", Day(0), Day(18)),
        new("Design", Day(14), Day(39)),
        new("Build", Day(35), Day(74)),
        new("Test", Day(63), Day(85))
    ];
}

Progress and milestones

Set Progress on a task, from 0 to 1, to fill that share of its bar; the tooltip and table view give it as a percentage. A task that ends when it starts is a milestone, drawn as a diamond. ShowTaskLabels writes each task's name after its bar.
Website relaunch
  • Milestone
Content auditWireframesSign-offVisual designDevelopmentGo live
Content auditWireframesSign-offVisual designDevelopmentGo live
Content audit
WireframesSign-off
Visual design
DevelopmentGo live
Content auditStart 12 OctEnd 23 OctDone 100%
WireframesStart 19 OctEnd 6 NovDone 80%
Sign-offDate 9 Nov
Visual designStart 9 NovEnd 4 DecDone 35%
DevelopmentStart 23 NovEnd 1 JanDone 10%
Go liveDate 4 Jan
12 Oct2 Nov23 Nov14 Dec4 Jan
RAZOR
<TwChart Title="Website relaunch">
    <TwGanttChart Tasks="@_progressTasks" ShowTaskLabels />
</TwChart>
CSHARP
@code {
    private readonly ChartTask[] _progressTasks =
    [
        new("Content audit", Day(0), Day(11)) { Progress = 1 },
        new("Wireframes", Day(7), Day(25)) { Progress = 0.8 },
        new("Sign-off", Day(28), Day(28)),
        new("Visual design", Day(28), Day(53)) { Progress = 0.35 },
        new("Development", Day(42), Day(81)) { Progress = 0.1 },
        new("Go live", Day(84), Day(84))
    ];
}

Summary tasks

Give a task a ParentId to list it under a summary task. A summary is drawn as a bracket that spans the tasks under it, and its progress is theirs weighted by length. The button beside its name shows or hides them, and the toolbar expands or collapses every summary. Bind CollapsedIds to keep which summaries are closed, or set DefaultExpandAll="false" to start with them all closed. Id defaults to the task's label, so it only needs setting when two tasks share a name.
Product launch
  • Summary
  • Milestone
DiscoveryInterviewsMarket reviewDeliveryDesignBuildBetaLaunch
DiscoveryInterviewsMarket reviewDeliveryDesignBuildBetaLaunch
DiscoveryStart 12 OctEnd 30 OctDone 100%
InterviewsStart 12 OctEnd 23 OctDone 100%
Market reviewStart 19 OctEnd 30 OctDone 100%
DeliveryStart 2 NovEnd 22 JanDone 36%
DesignStart 2 NovEnd 27 NovDone 70%
BuildStart 23 NovEnd 1 JanDone 30%
BetaStart 4 JanEnd 22 Jan
LaunchDate 25 Jan
12 Oct7 Nov3 Dec29 Dec25 Jan

Collapsed: none

RAZOR
<TwChart Title="Product launch">
    <TwGanttChart Tasks="@_treeTasks" @bind-CollapsedIds="_collapsed" />
</TwChart>
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Collapsed: <strong>@(_collapsed.Count == 0 ? "none" : string.Join(", ", _collapsed))</strong></p>
CSHARP
@code {
    private readonly ChartTask[] _treeTasks =
    [
        new("Discovery", Day(0), Day(0)) { Id = "discovery" },
        new("Interviews", Day(0), Day(11)) { ParentId = "discovery", Progress = 1 },
        new("Market review", Day(7), Day(18)) { ParentId = "discovery", Progress = 1 },
        new("Delivery", Day(21), Day(21)) { Id = "delivery" },
        new("Design", Day(21), Day(46)) { ParentId = "delivery", Progress = 0.7 },
        new("Build", Day(42), Day(81)) { ParentId = "delivery", Progress = 0.3 },
        new("Beta", Day(84), Day(102)) { ParentId = "delivery" },
        new("Launch", Day(105), Day(105))
    ];
    
    private IReadOnlySet<string> _collapsed = new HashSet<string>();
}

Dependencies

Pass Dependencies to draw an arrow from one task to another. A ChartTaskDependency names the two tasks by key and how they depend on each other: FinishToStart (the default), StartToStart, FinishToFinish or StartToFinish. Arrows turn at right angles and go round a task rather than through it. Hovering an arrow says what it means. An arrow into a collapsed summary points at the summary. Set ShowDependencies="false" to hide them.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
Design starts after Research finishesBuild starts when Design startsTest finishes when Build finishes
ResearchStart 12 OctEnd 30 Oct
DesignStart 26 OctEnd 20 Nov
BuildStart 16 NovEnd 25 Dec
TestStart 14 DecEnd 5 Jan
12 Oct2 Nov23 Nov14 Dec5 Jan
RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" Dependencies="@_dependencies" />
</TwChart>
CSHARP
@code {
    private readonly ChartTaskDependency[] _dependencies =
    [
        new("Research", "Design"),
        new("Design", "Build", ChartDependencyType.StartToStart),
        new("Build", "Test", ChartDependencyType.FinishToFinish)
    ];
}

Zoom levels

Zoom sets how much time the chart shows. GanttZoom.Auto, the default, fits the whole plan. Hour, Day, Week, Month, Quarter and Year give each period a column of SlotWidth pixels. The plot then scrolls on its own, keeping the task names in view. The toolbar's zoom controls change it; bind it with @bind-Zoom to follow them. RowHeight gives each row a fixed height, so the chart grows with the plan instead of fitting its Height.
Product launch
  • Summary
  • Milestone
DiscoveryInterviewsMarket reviewDeliveryDesignBuildBetaLaunch
DiscoveryInterviewsMarket reviewDeliveryDesignBuildBetaLaunch
DiscoveryStart 12 OctEnd 30 OctDone 100%
InterviewsStart 12 OctEnd 23 OctDone 100%
Market reviewStart 19 OctEnd 30 OctDone 100%
DeliveryStart 2 NovEnd 22 JanDone 36%
DesignStart 2 NovEnd 27 NovDone 70%
BuildStart 23 NovEnd 1 JanDone 30%
BetaStart 4 JanEnd 22 Jan
LaunchDate 25 Jan
W42W43W44W45W46W47W48W49W50W51W52W53W1W2W3W4

Zoom: Week

RAZOR
<TwChart Title="Product launch">
    <TwGanttChart Tasks="@_treeTasks" @bind-Zoom="_zoom" RowHeight="36" />
</TwChart>
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Zoom: <strong>@_zoom</strong></p>
CSHARP
@code {
    private GanttZoom _zoom = GanttZoom.Week;
}

Today, working days and a fixed range

A red line marks today when it falls in the chart's range. A zoomed-in chart first scrolls to it, and the toolbar's Today button scrolls back. Click Today in the legend to hide or show the line. Set Today to mark another moment, or ShowToday="false" to leave it out. At Day and Hour zoom, non-working days are shaded: Saturday and Sunday unless NonWorkingDays says otherwise. RangeStart and RangeEnd fix the dates shown instead of following the tasks. ColorIndex picks one of the theme's series colors for a bar.
Sprint 4
  • Milestone
  • Non-working day
Login pagePassword resetAudit logRelease
Login pagePassword resetAudit logRelease
Login pageStart 2 MarEnd 6 MarDone 100%
Password resetStart 5 MarEnd 13 MarDone 60%
Audit logStart 9 MarEnd 20 MarDone 20%
ReleaseDate 23 Mar
2 Mar3456789101112131415161718192021222324252627
RAZOR
<TwChart Title="Sprint 4">
    <TwGanttChart Tasks="@_sprintTasks"
                  Zoom="GanttZoom.Day"
                  Today="@_sprintToday"
                  NonWorkingDays="@_fourDayWeek"
                  RangeStart="@(new DateTime(2026, 3, 2, 0, 0, 0, DateTimeKind.Local))"
                  RangeEnd="@(new DateTime(2026, 3, 27, 0, 0, 0, DateTimeKind.Local))"
                  SlotWidth="32"
                  RowHeight="36" />
</TwChart>
CSHARP
@code {
    private readonly DateTime _sprintToday = new(2026, 3, 11, 14, 0, 0, DateTimeKind.Local);
    
    private readonly DayOfWeek[] _fourDayWeek = [DayOfWeek.Friday, DayOfWeek.Saturday, DayOfWeek.Sunday];
    
    private readonly ChartTask[] _sprintTasks =
    [
        new("Login page", new DateTime(2026, 3, 2, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 6, 0, 0, 0, DateTimeKind.Local)) { Progress = 1 },
        new("Password reset", new DateTime(2026, 3, 5, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 13, 0, 0, 0, DateTimeKind.Local)) { Progress = 0.6, ColorIndex = 1 },
        new("Audit log", new DateTime(2026, 3, 9, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 20, 0, 0, 0, DateTimeKind.Local)) { Progress = 0.2, ColorIndex = 2 },
        new("Release", new DateTime(2026, 3, 23, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 23, 0, 0, 0, DateTimeKind.Local))
    ];
}

Drag, resize and progress

AllowDrag lets a bar be dragged to new dates, keeping its length. AllowResize lets either end be dragged, and AllowProgressDrag adds a grip under the bar for its progress. Handles appear while the pointer is over a bar, and a dashed outline previews the change. Dates snap to the nearest column, or to midnight at Auto zoom, unless SnapToSlot="false". The chart never changes a task itself. OnTaskChange gives the new values in a ChartTaskChange. Store them to move the bar, or set Cancel to leave it where it was. Here a task cannot start before the plan begins. Summaries whose dates are rolled up cannot be dragged.
Release plan
  • Milestone
ResearchDesignBuildRelease
ResearchDesignBuildRelease
ResearchStart 12 OctEnd 30 OctDone 90%
DesignStart 26 OctEnd 20 NovDone 50%
BuildStart 16 NovEnd 25 DecDone 10%
ReleaseDate 28 Dec
W42W43W44W45W46W47W48W49W50W51W52W53

Last change: none

RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_editableTasks"
                  Zoom="GanttZoom.Week"
                  AllowDrag
                  AllowResize
                  AllowProgressDrag
                  OnTaskChange="@OnTaskChange" />
</TwChart>
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Last change: <strong>@_lastChange</strong></p>
CSHARP
@code {
    private List<ChartTask> _editableTasks =
    [
        new("Research", Day(0), Day(18)) { Progress = 0.9 },
        new("Design", Day(14), Day(39)) { Progress = 0.5 },
        new("Build", Day(35), Day(74)) { Progress = 0.1 },
        new("Release", Day(77), Day(77))
    ];
    
    private string _lastChange = "none";
    
    private void OnTaskChange(ChartTaskChange change)
    {
        if (change.Start < Day(0))
        {
            change.Cancel = true;
            _lastChange = $"{change.Task.Label} cannot start before the plan begins";
            return;
        }
    
        // Every gesture reports all three values, so one update covers them all.
        var index = _editableTasks.FindIndex(task => task.Key == change.Task.Key);
        _editableTasks[index] = change.Task with { Start = change.Start, End = change.End, Progress = change.Progress };
        _editableTasks = [.. _editableTasks];
        _lastChange = $"{change.Kind}: {change.Task.Label}, {change.Start:d MMM} to {change.End:d MMM}";
    }
}

Drawing and deleting dependencies

With AllowLinking, a dot appears beside each end of a bar under the pointer. Drag from a dot to another bar to draw a dependency. The ends picked decide its type: from the end of one bar to the start of another is FinishToStart. OnDependencyCreate receives a ChartDependencyRequest. The arrow appears once the dependency is in Dependencies, or set Cancel to refuse it, for example to stop a loop. Clicking an arrow raises OnDependencyClick, which removes it here.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
Design starts after Research finishes
ResearchStart 12 OctEnd 30 Oct
DesignStart 26 OctEnd 20 Nov
BuildStart 16 NovEnd 25 Dec
TestStart 14 DecEnd 5 Jan
Design starts after Research finishes
12 Oct2 Nov23 Nov14 Dec5 Jan

1 dependencies. Click an arrow to remove it.

RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks"
                  Dependencies="@_drawnDependencies"
                  AllowLinking
                  OnDependencyCreate="@OnDependencyCreate"
                  OnDependencyClick="@OnDependencyClick" />
</TwChart>
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">@_drawnDependencies.Count dependencies. Click an arrow to remove it.</p>
CSHARP
@code {
    private List<ChartTaskDependency> _drawnDependencies = [new("Research", "Design")];
    
    private void OnDependencyCreate(ChartDependencyRequest request)
    {
        // Refuse a dependency that is already there, or one running straight back the other way.
        if (_drawnDependencies.Any(d => (d.FromId == request.Dependency.FromId && d.ToId == request.Dependency.ToId)
            || (d.FromId == request.Dependency.ToId && d.ToId == request.Dependency.FromId)))
        {
            request.Cancel = true;
            return;
        }
    
        _drawnDependencies = [.. _drawnDependencies, request.Dependency];
    }
    
    private void OnDependencyClick(ChartTaskDependency dependency) =>
        _drawnDependencies = [.. _drawnDependencies.Where(d => d != dependency)];
}

Clicking a task

OnTaskClick is raised with the task when its row is clicked, or when Enter or Space is pressed on it, for example to open an edit form. Dragging is pointer only, so a form like this is how keyboard users change a task's dates.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
ResearchStart 12 OctEnd 30 Oct
DesignStart 26 OctEnd 20 Nov
BuildStart 16 NovEnd 25 Dec
TestStart 14 DecEnd 5 Jan
12 Oct2 Nov23 Nov14 Dec5 Jan

Selected: none

RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" OnTaskClick="@(task => _selectedTask = task)" />
</TwChart>
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Selected: <strong>@(_selectedTask is null ? "none" : $"{_selectedTask.Label}, {_selectedTask.Start:d MMM} to {_selectedTask.End:d MMM}")</strong></p>
CSHARP
@code {
    private ChartTask? _selectedTask;
}

Driving the chart from outside

Set ShowToolbar="false" to hide the built-in controls and use your own. Through a reference, SetZoomAsync changes the zoom, ExpandAllAsync and CollapseAllAsync open or close every summary, and GoToTodayAsync and ScrollToAsync scroll a zoomed-in chart. ShowZoomControls="false" keeps the toolbar without the zoom controls.
Product launch
  • Summary
  • Milestone
DiscoveryInterviewsMarket reviewDeliveryDesignBuildBetaLaunch
DiscoveryInterviewsMarket reviewDeliveryDesignBuildBetaLaunch
DiscoveryStart 12 OctEnd 30 OctDone 100%
InterviewsStart 12 OctEnd 23 OctDone 100%
Market reviewStart 19 OctEnd 30 OctDone 100%
DeliveryStart 2 NovEnd 22 JanDone 36%
DesignStart 2 NovEnd 27 NovDone 70%
BuildStart 23 NovEnd 1 JanDone 30%
BetaStart 4 JanEnd 22 Jan
LaunchDate 25 Jan
12 Oct7 Nov3 Dec29 Dec25 Jan
RAZOR
<div class="mb-3 flex flex-wrap gap-2">
    <TwButton Label="Month view" Variant="ButtonVariant.Outlined" Dense OnClick="@(() => _ganttRef!.SetZoomAsync(GanttZoom.Month))" />
    <TwButton Label="Week view" Variant="ButtonVariant.Outlined" Dense OnClick="@(() => _ganttRef!.SetZoomAsync(GanttZoom.Week))" />
    <TwButton Label="Fit" Variant="ButtonVariant.Outlined" Dense OnClick="@(() => _ganttRef!.SetZoomAsync(GanttZoom.Auto))" />
    <TwButton Label="Collapse all" Variant="ButtonVariant.Outlined" Dense OnClick="@(() => _ganttRef!.CollapseAllAsync())" />
    <TwButton Label="Expand all" Variant="ButtonVariant.Outlined" Dense OnClick="@(() => _ganttRef!.ExpandAllAsync())" />
    <TwButton Label="Go to launch" Variant="ButtonVariant.Outlined" Dense OnClick="@(() => _ganttRef!.ScrollToAsync(Day(86)))" />
</div>
<TwChart Title="Product launch">
    <TwGanttChart @ref="_ganttRef" Tasks="@_treeTasks" ShowToolbar="false" RowHeight="36" />
</TwChart>
CSHARP
@code {
    private TwGanttChart? _ganttRef;
}

Summaries with their own dates

By default a summary's dates and progress are rolled up from the tasks under it. Set RollUpSummaries="false" when a summary keeps dates of its own, such as a baseline agreed separately from the work. The summary then shows its own dates even when the tasks under it run late.
Phase 1 against its baseline
  • Summary
Phase 1 (baseline)RequirementsPrototype
Phase 1 (baseline)RequirementsPrototype
Phase 1 (baseline)Start 12 OctEnd 4 Dec
RequirementsStart 12 OctEnd 6 NovDone 100%
PrototypeStart 2 NovEnd 18 DecDone 60%
12 Oct28 Oct14 Nov1 Dec18 Dec
RAZOR
<TwChart Title="Phase 1 against its baseline">
    <TwGanttChart Tasks="@_baselineTasks" RollUpSummaries="false" />
</TwChart>
CSHARP
@code {
    private readonly ChartTask[] _baselineTasks =
    [
        new("Phase 1 (baseline)", Day(0), Day(53)) { Id = "phase-1" },
        new("Requirements", Day(0), Day(25)) { ParentId = "phase-1", Progress = 1 },
        new("Prototype", Day(21), Day(67)) { ParentId = "phase-1", Progress = 0.6 }
    ];
}

Date format and labels

DateFormat takes any .NET date format string and applies to the axis at Auto zoom, tooltips and the table view; by default it also shows the time at Hour zoom. StartLabel, EndLabel and LabelHeader rename the values in tooltips and the table view.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
ResearchBegins Mon 12 OctDue Fri 30 Oct
DesignBegins Mon 26 OctDue Fri 20 Nov
BuildBegins Mon 16 NovDue Fri 25 Dec
TestBegins Mon 14 DecDue Tue 5 Jan
Mon 12 OctMon 2 NovMon 23 NovMon 14 DecTue 5 Jan
RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" DateFormat="ddd d MMM" StartLabel="Begins" EndLabel="Due" LabelHeader="Phase" Height="ChartHeight.Small" />
</TwChart>

Loading and empty states

While the plan loads, set Loading on the surrounding TwChart to show a spinner with a "Loading chart" message, announced to screen readers. A chart with no tasks shows an empty state instead, whose message EmptyText changes. Both keep the chart's height, so the page does not jump when the tasks arrive.
Loading
Loading...

Loading chart

Empty

Nothing scheduled yet

RAZOR
<div class="grid gap-4 md:grid-cols-2">
    <TwChart Title="Loading" Loading Height="ChartHeight.Small">
        <TwGanttChart Tasks="@_tasks" />
    </TwChart>
    <TwChart Title="Empty" Height="ChartHeight.Small">
        <TwGanttChart Tasks="@([])" EmptyText="Nothing scheduled yet" />
    </TwChart>
</div>

Accessibility

Each row is a data point named after its task, with its dates and progress, for example "Code: Start 5 Jan, End 15 Jan, Done 25%". The plot is one Tab stop and the arrow keys move between rows. Each expand button is named after its summary ("Show the tasks under Build") and reports whether it is open. The zoom controls are a toggle group, and the toolbar buttons are ordinary buttons. The table view lists every task, including those under collapsed summaries. Moving, resizing, setting progress and drawing dependencies are pointer only, so offer another way to edit, such as a form opened from OnTaskClick. Text follows the app's language. The plot is drawn left to right in every language, as a calendar is, while the toolbar and task names follow the reading direction.

Shared features

The legend, tooltips, keyboard navigation, table view, height and empty state work the same on every chart. See TwChart for those options. The bars, axes and legend are styled by TwChartTheme; the task tree, zoom controls and drag handles by TwGanttTheme.

Keyboard navigation

The plot is a single Tab stop. Each data point is announced with its series and value as focus reaches it, and the table view presents the same data without the plot.
Key What it does
Tab Moves focus into the plot, onto the data point last visited.
Arrow Right or Arrow Down Moves to the next data point.
Arrow Left or Arrow Up Moves to the previous data point.
Home or End Moves to the first or last data point.
Escape Hides the tooltip of the focused data point.
Enter or Space On a legend item: shows or hides that series. On the table button: switches between the chart and its data table.

Theme configuration

Styling is controlled by TwBlazorTheme.Components (a TwGanttTheme), configured via the AddTwBlazor() options callback described on the Get Started page. Every property is a set of Tailwind classes, so changes are picked up by your own Tailwind build.
Property Type Controls
Scroller string
YAxisScrolling string
YAxis string
Clickable string
Toolbar string
Tick string
TickLabel string
Toggle string
ToggleIcon string
ToggleIconOpen string
ToggleSpacer string
Overlay string
Bar string
Handle string
HandleStart string
HandleEnd string
ProgressGrip string
LinkDot string
LinkDotStart string
LinkDotEnd string
Ghost string
LinkLine string
Links string
LinkHit string

Full reference: TwGanttTheme on the API docs.

On this page

  • Basic usage
  • Progress and milestones
  • Summary tasks
  • Dependencies
  • Zoom levels
  • Today, working days and a fixed range
  • Drag, resize and progress
  • Drawing and deleting dependencies
  • Clicking a task
  • Driving the chart from outside
  • Summaries with their own dates
  • Date format and labels
  • Loading and empty states
  • Accessibility
  • Shared features
  • Keyboard navigation
  • Theme configuration
twblazor

The Tailwind CSS component library for Blazor. Accessible, themeable and MIT licensed.

Discord (opens in a new tab) GitHub(opens in a new tab)

Get started

  • Install guide
  • Theming
  • Class merging
  • Localization

Guides

  • Tailwind CSS with Blazor
  • Why twblazor?
  • Right to left
  • AI agents and skills

Resources

  • API documentation (opens in a new tab)
  • llms.txt (opens in a new tab)
  • MIT License (opens in a new tab)

Community

  • Contributing (opens in a new tab)
  • Code of conduct (opens in a new tab)
  • Report an issue (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload