Issue card

Slant / Data

Compact work items with status, priority, assignees and subtask progress.

Demo

Usage

@tuttn/slant
import { Avatar, IssueCard, LaneBoard } from '@tuttn/slant'

<IssueCard
  serial="SL-142"
  title={<a href="/issues/SL-142">Build the ticket preview</a>}
  status={{ label: 'In progress', tone: 'accent' }}
  priority="High priority"
  tags={['components', 'preview']}
  subtasks={{ done: 2, total: 4 }}
  due={<time dateTime="2026-11-04">Due Nov 4</time>}
  assignee={<Avatar name="Alex Morgan" size={24} />}
/>

// Keep only the information this item needs.
<IssueCard title="Write the release notes" />

// LaneBoard owns dragging and keyboard focus. Its card content stays static.
<LaneBoard label="Sprint board" defaultLanes={lanes}
  renderCard={card => <IssueCard title={card.title} serial={card.id}
    style={{ border: 0, padding: 0, background: 'none' }} />}
/>

Props

PropTypeDefaultDescription
titleReactNode—The issue's title. Use a native link or button here when it opens something.
serialstring—A short identifier such as SL-142.
status{ label: string; tone?: Tone }—A readable state, optionally coloured by its semantic tone.
prioritystring—A readable priority, such as High priority.
tagsreadonly string[]—Short category labels, kept in the supplied order.
assigneeReactNode—An Avatar, a person's name or another ownership indicator.
dueReactNode—A due-date label; a time element can carry its machine-readable date.
subtasks{ done: number; total: number; label?: string }—Completed and total subtask counts. The label defaults to `messages.issueSubtasks`.
…restOmit<HTMLAttributes<HTMLDivElement>, 'title'>—Native attributes, className, style and the ref reach the outer div. Children add a final row for details or real actions.

Accessibility

  • Status, priority and subtask counts remain readable text; colour and the progress line are supplementary.
  • The root adds no role or tab stop. Native links and buttons inside keep their normal keyboard behaviour.
  • Use static title and content when the card is inside an interactive LaneBoard card.

Choose the useful fields

Only title is required. Supply an identifier, a readable status, a priority, tags, an owner or a date where they help someone understand the work. Omitted fields leave no placeholder. The status carries text as well as colour; priority is also plain text.

Subtasks

subtasks shows a readable completed count and total, with a decorative progress line. Counts become non-negative whole numbers; completion stops at the total. Invalid numbers become zero, and a zero total draws an empty line. Set subtasks.label to translate “Subtasks” or name a different checklist.

Actions and boards

Use a native link in title to open an issue, or a real button among the children for an action. The card itself adds no interaction. Inside LaneBoard, use only static content in renderCard and let the board own keyboard focus and dragging. Clear the inner border and padding as shown above.

Names and dates

assignee and due accept content, so you can reuse Avatar, show an owner's full name, or provide a date in your own locale. Use <time dateTime="…"> when the date has a machine-readable value. IssueCard does not infer overdue status from the clock.