Skip to main content

TaskCard

ComplexWork queues<co-task-card>

TaskCard is one staff task with done check, patient, due date, overdue tag, category and owner.

import { TaskCard } from 'health-components';

Examples​

Board​

Storybook

Overdue​

Storybook

Done​

Storybook

Usage​

<TaskCard task={{ title: "Call back about MRI auth", patient: "Ralph Edwards", due: "Today 3 PM", owner: "Sam Patel", tag: "Prior Auth" }} />

When to use​

  • Task boards and home dashboards.

When not to use​

  • Clinical results: InboxItem.

Variants and states​

VariantWhat it is
open / doneCheckbox.
overdueRed border and tag.

Accessibility​

  • Checkbox named after the task.

Do and don't​

  • Do: Name the owner.
  • Don't: Unowned tasks.

Props​

PropTypeDefaultDescription
task *TaskCardData—{title, patient?, due?, overdue?, done?, tag?, owner}; required
donebooleanundefined (uncontrolled, starts at `task.done`)Controlled done state
onDoneChange(done: boolean, task: TaskCardData) => void—Called when the done check changes

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-task-card>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-task-card done default-checked [task]="task" (co-done-change)="onDoneChange($event.detail)"></co-task-card>
KindNameDescription
property / JSON attributetask{title, patient?, due?, overdue?, done?, tag?, owner}; required
attributedoneControlled done state; default undefined (uncontrolled, starts at `task.done`)
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-done-changeCalled when the done check changes (React: onDoneChange)