Task
A collapsible task list component for displaying AI workflow progress, with status indicators and optional descriptions.
The Task component provides a structured way to display task lists or workflow progress with collapsible details, status indicators, and progress tracking. It consists of a main Task container with TaskTrigger for the clickable header and TaskContent for the collapsible content area.
Install using CLI
Install Manually
Copy and paste the following code in the same folder.
Usage with AI SDK
Build a mock async programming agent using experimental_generateObject.
Add the following component to your frontend:
pages/index.vue
Add the following route to your backend:
server/api/agent.ts
Features
- Visual icons for pending, in-progress, completed, and error states
- Expandable content for task descriptions and additional information
- Built-in progress counter showing completed vs total tasks
- Optional progressive reveal of tasks with customizable timing
- Support for custom content within task items
- Full type safety with proper TypeScript definitions
- Keyboard navigation and screen reader support
Props
<Task/>
defaultOpenboolean
trueclassstring
''<TaskTrigger/>
titlestring
''classstring
''<TaskContent/>
classstring
''<TaskItem/>
classstring
''<TaskItemFile/>
classstring
''