Components / Collections
Recency groups
Groups a history by Today, Yesterday, Previous 7 days, Previous 30 days, then month.
@fabrials/ui
Grouped relative to 26 Sep 2026, 15:00.
Installation
Import the control from
@fabrials/ui, after setting the app up.TypeScript import { groupByRecency, RECENCY_LABELS, TruncatedText } from "@fabrials/ui";
API reference
| Prop / export | Type | Description |
|---|---|---|
items | readonly T[] | Records to group, in the order to keep inside each group. |
getDate | (item) => Date | Reads the date of one record. Strings and numbers work too. |
now | Date | Reference time. Defaults to the current time. |
options | object | timeZone, locale and label overrides. |
Behavior
A helper, not a component. Buckets follow calendar days in the given time zone. The host renders the groups.
Accessibility
Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.