Task Rows

An agent’s task list with progress.

Launch email

1 of 5
  1. Read the brief, Done3s
  2. Collect product photos, In progress
  3. Draft the launch email, Not started
  4. Check links, Not started
  5. Schedule the send, Not started
'use client';

import { useEffect, useState } from 'react';
import { TaskRows } from '@brand-studio/ui';
import type { TaskRow } from '@brand-studio/ui';

const labels = ['Read the brief', 'Collect product photos', 'Draft the launch email', 'Check links', 'Schedule the send'];

export default function TaskRowsDemo() {
  const [step, setStep] = useState(1);
  useEffect(() => {
    const timer = setInterval(() => setStep((current) => (current + 1) % (labels.length + 2)), 1400);
    return () => clearInterval(timer);
  }, []);
  const tasks: TaskRow[] = labels.map((label, index) => ({
    id: label,
    label,
    status: index < step ? 'done' : index === step ? 'active' : 'pending',
    meta: index < step ? `${index * 4 + 3}s` : undefined,
  }));
  return <div style={{ width: '100%', maxWidth: 440 }}><TaskRows title="Launch email" tasks={tasks} /></div>;
}

Installation

pnpm add @brand-studio/ui

Usage

import { TaskRows } from '@brand-studio/ui';
<TaskRows title="Launch email" tasks={tasks} />

Examples

Failed task

Import

1 of 3
  1. Download the price list, Done2s
  2. Match 212 products, Failed3 missing
  3. Update the shop, Not started
import { TaskRows } from '@brand-studio/ui';

export default function TaskRowsFailed() {
  return (
    <div style={{ width: '100%', maxWidth: 440 }}>
      <TaskRows
        title="Import"
        tasks={[
          { id: 'a', label: 'Download the price list', status: 'done', meta: '2s' },
          { id: 'b', label: 'Match 212 products', status: 'failed', meta: '3 missing' },
          { id: 'c', label: 'Update the shop', status: 'pending' },
        ]}
      />
    </div>
  );
}

Accessibility

  • The count reads “2 of 5” and each row spells out its status for screen readers.
  • Spinners stop under reduced motion; the status text stays.

API Reference

PropTypeDefault
tasksTaskRow[]
title?string'Tasks'
className?string''

Still, Deskhand and Hollis are fictional brands. The coffee photographs are original generated artwork. @brand-studio/ui is MIT licensed.