PickCard
BasicLayout
<co-pick-card>PickCard is a large selectable card for choosing one option on phones, portal and kiosk (appointment, provider, reason).
import { PickCard } from 'health-components';
Examples
Showcase
Choose One
Disabled
Usage
<PickCard title="Thu 10/09 9:20 AM" meta="Follow-Up with Dr. Bell" selected onClick={pick} />
When to use
- Touch choices with two lines of detail.
When not to use
- Dense lists: RadioGroup.
Variants and states
| Variant | What it is |
|---|---|
| selected | Primary border and tint. |
| disabled | Faded. |
Accessibility
- aria-pressed.
Do and don't
- Do: Use for 2 to 6 options.
- Don't: Hide what differs between cards.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title * | string | — | Main line, e.g. "Thu 10/09 9:20 AM" |
meta | string | none | Second line (visit type, provider, place) |
selected | boolean | false | Chosen; sets aria-pressed |
disabled | boolean | false | Not available ("Fully booked") |
children | ReactNode | none | Extra content under the meta line |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, name, value, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-pick-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-pick-card title="…" meta="…" [defaultValue]="defaultValue">…</co-pick-card>
| Kind | Name | Description |
|---|---|---|
| attribute | title | Main line, e.g. "Thu 10/09 9:20 AM" |
| attribute | meta | Second line (visit type, provider, place); default none |
| attribute | selected | Chosen; sets aria-pressed; default false |
| attribute | disabled | Not available ("Fully booked"); default false |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| attribute | name | |
| property / JSON attribute | value | |
| slot | (default) | Extra content under the meta line; default none |