package
Render a Task list in Ink
npm install ink-task-listGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
10.5 kB
Includes dependencies.
Task list components for Ink
Support this project by ⭐️ starring and sharing it. Follow me to see what other cool projects I'm working on! ❤️
npm i ink-task-listimport React from 'react';
import { render } from 'ink';
import { TaskList, Task } from 'ink-task-list';
import spinners from 'cli-spinners';
render(
<TaskList>
{/* Pending state */}
<Task
label="Pending"
state="pending"
/>
{/* Loading state */}
<Task
label="Loading"
state="loading"
spinner={spinners.dots}
/>
Optional wrapper to contain a list of Tasks.
Basically just a <Box flexDirection="column">; only for styling and semantic purposes.
Type: ReactNode | ReactNode[]
Required
Pass in list of Tasks
Represents each task.
Type: string
Required
Type: 'pending'|'loading'|'success'|'warning'|'error'
Default: pending
Type: string
Status of the task to show on the right of the label
Type: string
Single-line output prefixed by → to show below the label
Type:
type Spinner = {
interval: number
frames: string[]
}Required if state is loading
Spinner data used for loading state. Pass in a spinner from cli-spinners for convenience.
Type: boolean
Default: false
Whether or not to show the children.
Type: ReactNode | ReactNode[]
Pass in one or more <Task> components