Task
Preview

Collapsible task/progress rows for agent work.

Overview

Task displays agent work as a small collapsible block. Consumers own the task list and status updates.

Usage

import {
  Task,
  TaskContent,
  TaskItem,
  TaskItemFile,
  TaskTrigger,
} from "@tilt-legal/cubitt-components/chat-elements";

Examples

Default

Running

Use Shimmer in the trigger when the consumer knows work is still active.

API Reference

Task

Root collapsible container for a task block. Extends Collapsible props.

PropTypeDefaultDescription
defaultOpenbooleantrueInitial open state when uncontrolled.
openboolean-Controlled open state inherited from Collapsible.
onOpenChange(open: boolean) => void-Callback fired when the collapsible state changes.
classNamestring-Additional CSS classes for the root collapsible.

TaskTrigger

Clickable trigger for the task block. Extends CollapsibleTrigger props, except the native title attribute is replaced with task title content.

PropTypeDefaultDescription
titleReact.ReactNode-Task title shown beside the default magnifier icon. Required.
childrenReact.ReactNode-Custom trigger content. Replaces the default icon/title/chevron.
classNamestring-Additional CSS classes for the trigger.

TaskContent

Collapsible panel for task details. Extends CollapsiblePanel props.

PropTypeDefaultDescription
childrenReact.ReactNode-Task item content rendered in the panel.
classNamestring-Additional CSS classes for the panel.

TaskItem

Task detail row. Extends all HTML div props.

PropTypeDefaultDescription
childrenReact.ReactNode-Detail row content.
classNamestring-Additional CSS classes for the item.

TaskItemFile

Inline file pill used inside task details. Extends all HTML div props.

PropTypeDefaultDescription
childrenReact.ReactNode-File label or custom file content.
classNamestring-Additional CSS classes for the file pill.

On this page