Skip to content
WunderUI

Task Row

Pro

One line of a Gantt task list: a status bar, the name, an assignee and the dates. As a group it is a header that folds the rows under it open and closed.

Playground

WireframesPRNov 9 – Nov 13

Installation

Task Row comes with WunderUI Core and Pro, in the package from your plan. See the plans.

Then import what you need:

tsx
import { TaskRow, TaskRowProps } from "@wunderui/react"

Then use it:

tsx
import { TaskRow } from "@wunderui/react"

export function Plan() {
  return (
    <div className="overflow-hidden rounded-xl border border-border bg-card">
      <TaskRow name="Wireframes" barClassName="bg-primary" assignee={{ name: "Priya Raman", color: "purple" }} dates="Nov 9 – Nov 13" className="border-b-0" />
    </div>
  )
}

Expected result: One row with a short indigo bar, the name Wireframes, a purple PR avatar and the dates at the right.

When to use

Use Task Row for

  • The task column of a Gantt or timeline view, with groups that fold
  • A task list where each row has an owner, a status colour and a date
  • A project plan that is read more often than it is edited

Use something else for

  • Checklist Task for a step in an onboarding checklist with a title, a description and a state
  • Kanban for a task on a board, with labels, a due date and assignees
  • Table for tasks that are sorted, filtered or compared across several columns

Type

A task is a 36 px row with a bar, name, assignee, dates and a rule. A group row is a button with only a name and chevron, no rule, assignee or dates, and fills with the page tone on hover.

WireframesPRNov 9 – Nov 13

Status

A background class sets the 20 px bar in front of the name, primary by default. Use one class per status, such as success for done and destructive for at risk; the row has no status text.

WireframesPRNov 9 – Nov 13

Assignee

The assignee is a person: a photo, or initials on a tint (purple by default). The avatar is 24 px in a 64 px column that stays when there is nobody, so the dates keep their place.

WireframesNLNov 9 – Nov 13

Dates

Dates sit in a 96 px column at the right in 11 px text, and a span gives them a colour, such as the red of an overdue date. The column does not wrap or cut, so keep the text short.

WireframesPRNov 9 – Nov 13

Width

The assignee (64 px) and dates (96 px) columns keep their width, so the name takes the rest and is cut with an ellipsis. Below about 320 px, hide the columns with a class.

Research and interviews with five customersMKNov 2 – Nov 6

Keyboard interactions

A group row is a native button with one tab stop. A task row is a plain div with none, and controls beside it, such as a checkbox, take focus in their own order.

TaborShiftTab
Moves focus to the next or previous group row, and to any control you placed in a task row. A focused group row gets the indigo focus outline on its edge.
EnterorSpace
Presses the focused group row and calls ; the page then flips .

Arrow keys don't move between rows. Build the list as a ul so a screen reader announces its length, and keep the DOM order the same as the screen order.

Behavior and motion

What the row does with state, content, the DOM and motion.

Task and group
A task shows the bar, name, assignee and dates. A group is a button with a chevron and the name that reports expanded or collapsed, and it hides no rows itself, so render them only while open.
States
A task row is static, with no hover, pressed or focus look. A group row lightens on hover, goes subtle while pressed and shows the indigo focus outline on the keyboard, and the chevron flips at once.
Columns and width
The name takes the free width and is cut with an ellipsis. The assignee (64 px) and dates (96 px) columns keep their width, so below about 320 px hide them in a narrow list.
Dates and status
Dates and name take any content, so a due date can be coloured or a finished task struck through. The row has no check, done or overdue state of its own.
Avatar
An assignee with a photo shows it and keeps the initials as fallback. Without a photo the initials sit on a tint, purple by default, and the person's name is the avatar's title.
Names for assistive technology
A group button is announced as expanded or collapsed and points at the region it controls. A task reads as plain text, name then dates, and the bar isn't announced, so put status in text.
Motion and reduced motion
A group's fill fades quickly on hover, and instantly with reduced motion. Nothing moves, and folding a group shows or hides the rows at once.

Anatomy

The parts of a task row, numbered in the figure. Task Row is one component, so the bar, avatar and dates aren't separate exports, and a group row has only the chevron and name.

WireframesPRNov 9 – Nov 13
  • data-slot="task-row"

    The row, as high as a control (36 px, 40 px at comfortable density), with 16 px side padding and 16 px between columns. A task is a div with a 1 px rule under it, a group is a button.

  • Optional

    A 20 px wide, 4 px high rounded bar in front of the name. It is primary by default, can take a status colour, and is not announced.

  • The name in 14 px text on one line. It takes the free width and is cut with an ellipsis, and a group name is semibold.

  • Optional

    A centred 24 px avatar of the assignee in a 64 px column. The column stays when there is nobody.

  • Optional

    The dates in 11 px tertiary text, right-aligned in a 96 px column.

Best practices

  • Do

    Use group rows for collapsible sections. Pass the id of the region that holds the rows so the button also sets aria-controls.

  • Do

    Give each status one bar colour, such as green for done and red for at risk, and keep the mapping the same across the page.

  • Do

    Say the status in text too. The bar is just a picture, so put Done or Overdue in the dates or name where a screen reader reads it.

  • Do

    Add what the row lacks yourself: a checkbox in front of it in a list item, a struck-through name, coloured dates.

  • Do

    Hide the assignee and dates columns with a class in a narrow list. The row never drops them by itself.

  • Don’t

    Don't pass an assignee or dates to a group row. It shows only the name.

  • Don’t

    Don't treat the row as a button for the whole task. A task row is static with no hover or focus look, so put the action in a control inside your own wrapper.

  • Don’t

    Don't put a long sentence in the dates. The column is 96 px wide and doesn't wrap.

API reference

Task Row is one component with the props below. It takes no other attributes, so an id, a data attribute or an aria-label can't be passed to the row.

The row, as high as a control (36 px, 40 px at comfortable density), with 16 px side padding and 16 px between columns. A task is a div with a 1 px rule under it, a group is a button.

PropTypeDefaultDescription
name requiredReactNode—The name of the task or the group, on one line. It takes any node, for example a span that strikes a finished task through. Required.
groupboolean—Makes the row a group header: a button with a chevron and the name. The bar, the assignee and the dates are not drawn.
openbooleantrueFor a group: whether its rows are shown. It sets and the direction of the chevron. Default .
onToggle() => void—For a group: called when the button is pressed with the pointer, Enter or Space. Flip in it and show or hide the rows.
controlsstring—For a group: the id of the region that holds its rows. It sets on the button, so a screen reader can jump to the rows the button shows or hides.
barClassNamestring"bg-primary"A background class for the bar in front of the name, for example . Default .
assigneePerson—: a 24 px avatar in a 64 px column. Without it shows the initials on the tint of (default ). The column stays when there is no assignee.
datesReactNode—The dates, for example , in a 96 px column at the right. Text or a node; it does not wrap.
classNamestring—Added to the row, after the built-in classes. Use it for on the last row of a box, a height, or classes that hide the assignee and dates columns.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("task-row")
InstallIncluded in Core and Pro

The full library index for assistants is at /llms.txt.