{"id":16347812,"url":"https://github.com/privatenumber/ink-task-list","last_synced_at":"2025-03-21T00:30:22.668Z","repository":{"id":40580732,"uuid":"363769200","full_name":"privatenumber/ink-task-list","owner":"privatenumber","description":"Task runner components for Ink","archived":false,"fork":false,"pushed_at":"2022-05-01T01:32:55.000Z","size":380,"stargazers_count":28,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-05-04T00:17:53.462Z","etag":null,"topics":["components","ink","runner","task"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/privatenumber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-02T23:12:05.000Z","updated_at":"2024-04-19T07:28:31.000Z","dependencies_parsed_at":"2022-08-09T23:41:05.375Z","dependency_job_id":null,"html_url":"https://github.com/privatenumber/ink-task-list","commit_stats":null,"previous_names":["privatenumber/ink-task-runner"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fink-task-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fink-task-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fink-task-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fink-task-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/privatenumber","download_url":"https://codeload.github.com/privatenumber/ink-task-list/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244092769,"owners_count":20396868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["components","ink","runner","task"],"created_at":"2024-10-11T00:46:10.494Z","updated_at":"2025-03-21T00:30:22.227Z","avatar_url":"https://github.com/privatenumber.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ink-task-list \u003ca href=\"https://npm.im/ink-task-list\"\u003e\u003cimg src=\"https://badgen.net/npm/v/ink-task-list\"\u003e\u003c/a\u003e \u003ca href=\"https://npm.im/ink-task-list\"\u003e\u003cimg src=\"https://badgen.net/npm/dm/ink-task-list\"\u003e\u003c/a\u003e \u003ca href=\"https://packagephobia.now.sh/result?p=ink-task-list\"\u003e\u003cimg src=\"https://packagephobia.now.sh/badge?p=ink-task-list\"\u003e\u003c/a\u003e\n\nTask list components for [Ink](https://github.com/vadimdemedes/ink)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"400\" src=\".github/task-list.gif\"\u003e\n\u003c/p\u003e\n\n\u003csub\u003eSupport this project by ⭐️ starring and sharing it. [Follow me](https://github.com/privatenumber) to see what other cool projects I'm working on! ❤️\u003c/sub\u003e\n\n## 🚀 Install\n```sh\nnpm i ink-task-list\n```\n\n## 🚦 Quick usage\n```tsx\nimport React from 'react';\nimport { render } from 'ink';\nimport { TaskList, Task } from 'ink-task-list';\nimport spinners from 'cli-spinners';\n\nrender(\n    \u003cTaskList\u003e\n        {/* Pending state */}\n        \u003cTask\n            label=\"Pending\"\n            state=\"pending\"\n        /\u003e\n\n        {/* Loading state */}\n        \u003cTask\n            label=\"Loading\"\n            state=\"loading\"\n            spinner={spinners.dots}\n        /\u003e\n\n        {/* Success state */}\n        \u003cTask\n            label=\"Success\"\n            state=\"success\"\n        /\u003e\n\n        {/* Warning state */}\n        \u003cTask\n            label=\"Warning\"\n            state=\"warning\"\n        /\u003e\n\n        {/* Error state */}\n        \u003cTask\n            label=\"Error\"\n            state=\"error\"\n        /\u003e\n\n        {/* Item with children */}\n        \u003cTask\n            label=\"Item with children\"\n            isExpanded\n        \u003e\n            \u003cTask\n                label=\"Loading\"\n                state=\"loading\"\n                spinner={spinners.dots}\n            /\u003e\n        \u003c/Task\u003e\n    \u003c/TaskList\u003e,\n);\n```\n\n## 🎛 API\n\n### TaskList\n\nOptional wrapper to contain a list of `Tasks`.\n\nBasically just a `\u003cBox flexDirection=\"column\"\u003e`; only for styling and semantic purposes.\n\n#### children\nType: `ReactNode | ReactNode[]`\n\nRequired\n\nPass in list of Tasks\n\n### Task\n\nRepresents each task.\n\n#### label\nType: `string`\n\nRequired\n\n#### state\nType: `'pending'|'loading'|'success'|'warning'|'error'`\n\nDefault: `pending`\n\n\u003cimg src=\".github/states.gif\" width=\"216\"\u003e\n\n#### status\nType: `string`\n\nStatus of the task to show on the right of the `label`\n\n\u003cimg src=\".github/states-w-status.gif\" width=\"216\"\u003e\n\n#### output\nType: `string`\n\nSingle-line output prefixed by `→` to show below the `label`\n\n\u003cimg src=\".github/states-w-output.gif\" width=\"216\"\u003e\n\n#### spinner\nType:\n```ts\ntype Spinner = {\n    interval: number\n    frames: string[]\n}\n```\n\nRequired if state is `loading`\n\nSpinner data used for loading state. Pass in a spinner from [cli-spinners](https://github.com/sindresorhus/cli-spinners) for convenience.\n\n#### isExpanded\nType: `boolean`\n\nDefault: `false`\n\nWhether or not to show the children.\n\n#### children\nType: `ReactNode | ReactNode[]`\n\nPass in one or more `\u003cTask\u003e` components\n\n\u003cimg src=\".github/nested.gif\" width=\"216\"\u003e\n\n## 🙏 Credits\nThe component UI was inspired [listr](https://github.com/SamVerschueren/listr) and [listr2](https://github.com/cenk1cenk2/listr2) ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fink-task-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprivatenumber%2Fink-task-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fink-task-list/lists"}