Skip to main content

QuickActions

BasicLayout<co-quick-actions>

QuickActions is the 3-column grid of big icon tiles on phone and portal home screens.

import { QuickActions } from 'health-components';

Examples​

Storybook

Usage​

<QuickActions items={[{ label: "Book Visit", icon: "calendar" }, { label: "Messages", icon: "message", badge: 2 }]} />

When to use​

  • Phone and portal home.

When not to use​

  • Desktop: buttons in the page header.

Variants and states​

VariantWhat it is
badgeCount on a tile.

Accessibility​

  • Links with text labels, 44px tall.

Do and don't​

  • Do: Six tiles at most.
  • Don't: Icons without labels.

Props​

PropTypeDefaultDescription
items *QuickActionItem[]—Array<{label, icon, href?, badge?, onClick?}>

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-quick-actions>. 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-quick-actions default-checked auto-focus [items]="items"></co-quick-actions>
KindNameDescription
property / JSON attributeitemsArray<{label, icon, href?, badge?, onClick?}>
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus