UI & interactionAccessible dialogs: modal, sheet, confirm
One small dialog core that does the whole job: a modal, side and bottom sheets you can drag away, and awaitable confirm() and prompt().
A date (and optional time) picker as an inline calendar or a popover from a text field, which becomes a bottom sheet on a phone.
Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo driving itself, one step every 10 frames: it opens the Date field’s popover, moves the focus with the arrow keys and Page Up and Down (a month’s grid redrawn each time), closes it, then picks a range on the inline two-month calendar with the preview following the pointer across days, pages the months on and back, and types a date into a field. Nothing runs between steps. Phones: tiers are being measured next.
| Machine | GPU ms | CPU ms | CPU p95 |
|---|---|---|---|
| unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool | not timed | <0.01 | 0.46 |
| apple · Apple A19 Proin a browser tab · 16 November 2026 | not timed | <0.01 | 2.10 |
| Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026 | not timed | <0.01 | 1.17 |
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
Written for the library. Fully custom code.
WAI-ARIA Authoring Practices Guide (W3C): The date picker dialog example: the Choose Date button and its changing name, the modal dialog, the grid with its keys (arrows, Home/End, Page Up/Down and Shift for years), the month heading announced, and focus back on the opener. Also the spinbutton pattern for the time. Written here from scratch.
Howard Hinnant, chrono-compatible low-level date algorithms: The days-from-civil and civil-from-days method (400-year eras, years starting in March) behind toDays and fromDays, written here from its description.
ISO 8601: Week numbering (weeks start on Monday; week 1 holds the year’s first Thursday) and the YYYY-MM-DD text form.
Unicode CLDR week data: The first day of the week and weekend by region, as a fallback table where Intl.Locale has no week info.