Lists & tables
Dosages, times and IDs are always mono with the unit beside the value.
List
- Title first, metadata second.
- Trailing slot for one badge or action.
- Give the list an aria-label.
Dr. Ana Lopez
Orthopedic surgeon
NewRiverside Pharmacy
Fills prescriptions
Table
- Numbers right-aligned and mono.
- Status in a badge, never a coloured cell.
- Always a caption.
Medication log| Time | Medication | Dose | Status |
|---|
| 08:00 | Oxycodone | 5 mg | Taken |
| 12:00 | Acetaminophen | 500 mg | Due soon |
| 20:00 | Enoxaparin | 40 mg | Scheduled |
Demo
- shadcn's Table on the DS Table: caption, header, body and a totals row.
- The total is added up from the rows, never typed in.
- Status is a DS Badge: Paid success, Pending info, Unpaid warning.
Pharmacy copays, November| Receipt | Status | Paid with | Amount |
|---|
| RX-1041 | Paid | Insurance | $12.50 |
| RX-1042 | Pending | HSA card | $8.00 |
| RX-1043 | Unpaid | Bill me | $35.00 |
| RX-1044 | Paid | Insurance | $4.25 |
| RX-1045 | Paid | Credit card | $15.00 |
| RX-1046 | Pending | Insurance | $10.00 |
| RX-1047 | Unpaid | Bill me | $22.00 |
| Total | | | $106.75 |
|---|
Actions
- Row actions use the Data table pattern: an icon-only link button named Actions for the row, opening a Dropdown Menu.
- Leaving the list is red and sits behind a separator.
Your medications| Medication | Copay | Actions |
|---|
| Lisinopril 10 mg | $4.00 | |
| Metformin 500 mg | $0.00 | |
| Atorvastatin 20 mg | $12.00 | |