Skip to main content

InboxItem

ComplexWork queues<co-inbox-item>

InboxItem is one inbox card for a result, refill, message, co-sign, imaging or fax, with priority and inline actions.

import { InboxItem } from 'health-components';

Examples​

Inbox​

Storybook

Kinds​

Storybook

Usage​

<InboxItem item={{ kind: "refill", patient: "Henna West", title: "Metformin 500 mg", from: "Walgreens", received: "9:02 AM", actions: ["Approve", "Deny"] }} />

When to use​

  • Inbox cards on phones and dashboards.

When not to use​

  • Bulk work: InboxList table.

Variants and states​

VariantWhat it is
kindsresult, refill, message, cosign, imaging, fax.
unreadBold with primary edge.
criticalRed card.

Accessibility​

  • Priority in words.

Do and don't​

  • Do: First action is the likely one.
  • Don't: More than 3 actions.

Props​

PropTypeDefaultDescription
item *InboxItemData—{kind, patient, title, from, received, priority?, unread?, actions?: string[]}; required
onAction(action: string, item: InboxItemData) => voidnoneCalled with the action label when an action button is pressed

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-inbox-item>. 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-inbox-item default-checked auto-focus [item]="item" (co-action)="onAction($event.detail)"></co-inbox-item>
KindNameDescription
property / JSON attributeitem{kind, patient, title, from, received, priority?, unread?, actions?: string[]}; required
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-actionCalled with the action label when an action button is pressed; default none (React: onAction)