Vanilla Breeze

work-item

General-purpose work unit card for tasks, bugs, chores, spikes, and features — the engineering sibling of user-story.

Overview

A web component for engineering work units — tasks, bugs, chores, spikes, and features. While <user-story> captures product needs in agile format, <work-item> represents the implementation work: what needs to be built, fixed, researched, or maintained. A single story may decompose into multiple work items, and some work items exist independently of any story.

Attributes

AttributeTypeDefaultDescription
item-idstringUnique identifier (also sets HTML id for cross-referencing)
typestring"task"task, bug, chore, spike, or feature
prioritystring"medium"critical, high, medium, or low
statusstring"backlog"backlog, to-do, in-progress, review, done, or blocked
estimatestringEffort estimate (points, hours, t-shirt size)
assigneestringAssignee name (shown with auto-generated avatar)
story-idsstringComma-separated linked <user-story> IDs
detailstring"full"full, compact, or minimal
compactbooleanAlias for detail="compact"
srcstring (URL)Path to JSON data file

Slots

SlotExpected ContentDescription
title<h3> or textWork item title displayed in the card header.
description<p>Work item description. Shows in the body section.
checklist<ul> or <ol>Subtasks or checklist items.
notes<p>Additional notes, context, or links.

Item Types

Each type gets a distinct icon and color badge in the header. Types are semantic — they help teams categorize work without requiring a separate labeling system.

TypeUse Case
taskEngineering implementation work (default)
bugDefect that needs fixing
choreTech debt, maintenance, or operational work
spikeResearch, investigation, or proof-of-concept
featureNew user-facing capability

Cross-Referencing

Work items connect to the broader UX Planning system through two mechanisms:

  • story-ids — links outward to <user-story> elements via fragment anchors. Rendered as clickable chips in the card body.
  • item-id — auto-set as the HTML id, enabling inbound references from <gantt-chart> rows via data-task-id matching.

Events

EventDetailWhen
work-item:ready{ itemId, title, type, priority, status }After render
work-item:status{ status, itemId }When updateStatus() is called
work-item:priority{ priority, itemId }When updatePriority() is called

CSS Custom Properties

VariableDefaultDescription
--work-item-bg#ffffffCard background
--work-item-text#1a1a1aPrimary text
--work-item-border#e0e0e0Card border
--work-item-accent#0066ccInteractive color
--work-item-card-bg#f8f9faHeader background

Accessibility

  • Card is an <article> with aria-label
  • Type badge uses colored background for visual distinction (not color-only)
  • Story links are real <a> elements with fragment hrefs
  • Respects prefers-reduced-motion: reduce
  • Print styles remove shadows for clean output

Related