Skip to content

Task List

A step/task progress display component for Ink 5. Shows a list of tasks with status indicators (spinner, checkmark, error, pending).

Install

Terminal window
npm install @matthesketh/ink-task-list

Usage

import React from 'react';
import { render } from 'ink';
import { TaskList } from '@matthesketh/ink-task-list';
function App() {
return (
<TaskList
tasks={[
{ label: 'Install dependencies', status: 'success' },
{ label: 'Build project', status: 'running' },
{ label: 'Run tests', status: 'pending' },
]}
/>
);
}
render(<App />);

API

<TaskList>

PropTypeDefaultDescription
tasksTask[]Array of tasks to display
showOutputbooleantrueWhether to show task output lines

Task

PropertyTypeDescription
labelstringTask label text
statusTaskStatusOne of: pending, running, success, error, skipped
outputstring?Optional output shown below the task

Status indicators

StatusIndicatorStyle
pendingdim
runningspinnercyan, bold label
successgreen
errorred
skippeddim

License

MIT