cv-task-list
Slotted shell for task rows with panel, busy, empty, header, footer, and density styling.
The component provides task-list structure, accessible busy/empty semantics, and baseline styling for direct slotted role="listitem" rows. Consumers still own task data, progress math, formatting, retry, cancel, and custom row behavior.
Usage
Anatomy
<cv-task-list> (host)
└── <section part="base" aria-label="Tasks">
├── <div part="header"> optional
├── <div part="list" role="list">
│ └── <slot>
├── <div part="empty"> optional
└── <div part="footer"> optionalAttributes
| Attribute | Type | Default | Description |
|---|---|---|---|
label | String | "Tasks" | Accessible label for the task list shell |
busy | Boolean | false | Sets aria-busy |
empty | Boolean | false | Renders empty slot instead of default rows |
density | String | "comfortable" | "comfortable" or "compact" |
Slots
| Slot | Description |
|---|---|
header | Header content |
(default) | Task rows |
empty | Empty state content |
footer | Footer content |
CSS Parts
| Part | Description |
|---|---|
base | Root section |
header | Header slot wrapper |
list | Default row list wrapper |
empty | Empty slot wrapper |
footer | Footer slot wrapper |
CSS Custom Properties
| Property | Default | Description |
|---|---|---|
--cv-task-list-gap | var(--cv-space-3, 12px) | Gap between shell regions |
--cv-task-list-padding | var(--cv-space-4, 16px) | Root section padding |
--cv-task-list-radius | var(--cv-radius-md, 10px) | Root section radius |
--cv-task-list-background | var(--cv-color-surface-2, #181f2b) | Root section background |
--cv-task-list-border | 1px solid var(--cv-color-border, ...) | Root section border |
--cv-task-list-row-gap | var(--cv-space-2, 8px) | Gap between rows |
--cv-task-list-row-padding-block | var(--cv-space-3, 12px) | Row block padding |
--cv-task-list-row-padding-inline | var(--cv-space-3, 12px) | Row inline padding |
--cv-task-list-row-radius | var(--cv-radius-sm, 6px) | Row radius |
--cv-task-list-row-background | var(--cv-color-surface-glass-subtle) | Direct role="listitem" rows |
--cv-task-list-empty-min-block-size | 96px | Minimum empty-state block size |
Visual States
| Selector | Description |
|---|---|
:host([busy]) | Sets aria-busy="true" and shows a restrained scan line |
:host([empty]) | Renders slot="empty" instead of the default list |
:host([density="compact"]) | Reduces shell and row spacing |
[role="listitem"]:hover | Emphasizes direct slotted task rows |
Events
None.