@rubenlangeweg/mero-ui 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +25 -4
  3. package/agent-docs/components/accordion.md +1 -1
  4. package/agent-docs/components/action-bar.md +1 -1
  5. package/agent-docs/components/action-button.md +32 -1
  6. package/agent-docs/components/agenda.md +1 -1
  7. package/agent-docs/components/alert-dialog.md +1 -1
  8. package/agent-docs/components/alert.md +1 -1
  9. package/agent-docs/components/app-layout.md +1 -1
  10. package/agent-docs/components/area-chart.md +1 -1
  11. package/agent-docs/components/aura.md +1 -1
  12. package/agent-docs/components/autocomplete.md +1 -1
  13. package/agent-docs/components/avatar-group.md +1 -1
  14. package/agent-docs/components/avatar.md +1 -1
  15. package/agent-docs/components/badge.md +1 -1
  16. package/agent-docs/components/bar-chart.md +1 -1
  17. package/agent-docs/components/breadcrumbs.md +1 -1
  18. package/agent-docs/components/browser-mockup.md +1 -1
  19. package/agent-docs/components/button-group.md +1 -1
  20. package/agent-docs/components/button.md +32 -1
  21. package/agent-docs/components/calendar.md +3 -3
  22. package/agent-docs/components/card.md +56 -1
  23. package/agent-docs/components/carousel.md +1 -1
  24. package/agent-docs/components/cell-color-picker.md +1 -1
  25. package/agent-docs/components/cell-select.md +1 -1
  26. package/agent-docs/components/cell-slider.md +1 -1
  27. package/agent-docs/components/cell-switch.md +1 -1
  28. package/agent-docs/components/chain-of-thought.md +1 -1
  29. package/agent-docs/components/chart-tooltip.md +1 -1
  30. package/agent-docs/components/chat-attachment.md +1 -1
  31. package/agent-docs/components/chat-conversation.md +1 -1
  32. package/agent-docs/components/chat-list-view.md +1 -1
  33. package/agent-docs/components/chat-loader.md +1 -1
  34. package/agent-docs/components/chat-message-actions.md +1 -1
  35. package/agent-docs/components/chat-message.md +1 -1
  36. package/agent-docs/components/chat-source.md +1 -1
  37. package/agent-docs/components/chat-tool.md +1 -1
  38. package/agent-docs/components/checkbox-button-group.md +1 -1
  39. package/agent-docs/components/checkbox-group.md +1 -1
  40. package/agent-docs/components/checkbox.md +1 -1
  41. package/agent-docs/components/chip.md +1 -1
  42. package/agent-docs/components/close-button.md +1 -1
  43. package/agent-docs/components/code-block.md +1 -1
  44. package/agent-docs/components/code-mockup.md +1 -1
  45. package/agent-docs/components/color-area.md +1 -1
  46. package/agent-docs/components/color-field.md +1 -1
  47. package/agent-docs/components/color-picker.md +1 -1
  48. package/agent-docs/components/color-slider.md +1 -1
  49. package/agent-docs/components/color-swatch.md +1 -1
  50. package/agent-docs/components/combo-box.md +1 -1
  51. package/agent-docs/components/command-menu.md +1 -1
  52. package/agent-docs/components/command.md +1 -1
  53. package/agent-docs/components/composed-chart.md +1 -1
  54. package/agent-docs/components/context-menu.md +1 -1
  55. package/agent-docs/components/countdown.md +1 -1
  56. package/agent-docs/components/data-grid.md +1 -1
  57. package/agent-docs/components/date-field.md +1 -1
  58. package/agent-docs/components/date-picker.md +1 -1
  59. package/agent-docs/components/date-range-picker.md +1 -1
  60. package/agent-docs/components/description-list.md +30 -0
  61. package/agent-docs/components/description.md +1 -1
  62. package/agent-docs/components/diff.md +1 -1
  63. package/agent-docs/components/disclosure-group.md +1 -1
  64. package/agent-docs/components/disclosure.md +1 -1
  65. package/agent-docs/components/dock.md +1 -1
  66. package/agent-docs/components/drawer.md +83 -1
  67. package/agent-docs/components/drop-zone.md +1 -1
  68. package/agent-docs/components/dropdown.md +1 -1
  69. package/agent-docs/components/emoji-picker.md +1 -1
  70. package/agent-docs/components/emoji-reaction-button.md +1 -1
  71. package/agent-docs/components/empty-state.md +36 -4
  72. package/agent-docs/components/error-message.md +1 -1
  73. package/agent-docs/components/fab.md +1 -1
  74. package/agent-docs/components/field-error.md +1 -1
  75. package/agent-docs/components/fieldset.md +45 -1
  76. package/agent-docs/components/file-input.md +1 -1
  77. package/agent-docs/components/file-tree.md +1 -1
  78. package/agent-docs/components/filter-chips.md +1 -1
  79. package/agent-docs/components/floating-toc.md +1 -1
  80. package/agent-docs/components/footer.md +1 -1
  81. package/agent-docs/components/form.md +155 -1
  82. package/agent-docs/components/hero.md +1 -1
  83. package/agent-docs/components/holo-card.md +1 -1
  84. package/agent-docs/components/hover-card.md +1 -1
  85. package/agent-docs/components/hover-gallery.md +1 -1
  86. package/agent-docs/components/indicator.md +1 -1
  87. package/agent-docs/components/inline-select.md +1 -1
  88. package/agent-docs/components/input-group.md +1 -1
  89. package/agent-docs/components/input-otp.md +1 -1
  90. package/agent-docs/components/input.md +1 -1
  91. package/agent-docs/components/item-card-group.md +1 -1
  92. package/agent-docs/components/item-card.md +1 -1
  93. package/agent-docs/components/join.md +1 -1
  94. package/agent-docs/components/joined-filter.md +1 -1
  95. package/agent-docs/components/kanban.md +1 -1
  96. package/agent-docs/components/kbd.md +32 -1
  97. package/agent-docs/components/kpi-group.md +1 -1
  98. package/agent-docs/components/kpi.md +1 -1
  99. package/agent-docs/components/label.md +1 -1
  100. package/agent-docs/components/line-chart.md +1 -1
  101. package/agent-docs/components/link.md +1 -1
  102. package/agent-docs/components/list-box.md +1 -1
  103. package/agent-docs/components/list-view.md +1 -1
  104. package/agent-docs/components/live-progress.md +34 -1
  105. package/agent-docs/components/map.md +1 -1
  106. package/agent-docs/components/markdown.md +1 -1
  107. package/agent-docs/components/mask.md +1 -1
  108. package/agent-docs/components/megamenu.md +1 -1
  109. package/agent-docs/components/menu-button.md +35 -1
  110. package/agent-docs/components/menu.md +1 -1
  111. package/agent-docs/components/meter.md +1 -1
  112. package/agent-docs/components/modal.md +1 -1
  113. package/agent-docs/components/native-select.md +1 -1
  114. package/agent-docs/components/navbar.md +1 -1
  115. package/agent-docs/components/number-field.md +1 -1
  116. package/agent-docs/components/number-stepper.md +1 -1
  117. package/agent-docs/components/number-value.md +1 -1
  118. package/agent-docs/components/page-header.md +69 -0
  119. package/agent-docs/components/pagination.md +1 -1
  120. package/agent-docs/components/phone-mockup.md +1 -1
  121. package/agent-docs/components/pie-chart.md +1 -1
  122. package/agent-docs/components/popover.md +1 -1
  123. package/agent-docs/components/pressable-feedback.md +1 -1
  124. package/agent-docs/components/progress-bar.md +1 -1
  125. package/agent-docs/components/progress-circle.md +1 -1
  126. package/agent-docs/components/prompt-input.md +1 -1
  127. package/agent-docs/components/prompt-suggestion.md +1 -1
  128. package/agent-docs/components/radar-chart.md +1 -1
  129. package/agent-docs/components/radial-chart.md +1 -1
  130. package/agent-docs/components/radio-button-group.md +1 -1
  131. package/agent-docs/components/radio-group.md +1 -1
  132. package/agent-docs/components/range-calendar.md +1 -1
  133. package/agent-docs/components/rating.md +1 -1
  134. package/agent-docs/components/resizable.md +1 -1
  135. package/agent-docs/components/rich-text-editor.md +1 -1
  136. package/agent-docs/components/scroll-shadow.md +1 -1
  137. package/agent-docs/components/search-field.md +43 -1
  138. package/agent-docs/components/segment.md +1 -1
  139. package/agent-docs/components/select.md +1 -1
  140. package/agent-docs/components/separator.md +1 -1
  141. package/agent-docs/components/sheet.md +1 -1
  142. package/agent-docs/components/sidebar.md +1 -1
  143. package/agent-docs/components/skeleton.md +1 -1
  144. package/agent-docs/components/slider.md +1 -1
  145. package/agent-docs/components/sortable-table.md +1 -1
  146. package/agent-docs/components/spinner.md +1 -1
  147. package/agent-docs/components/stack.md +1 -1
  148. package/agent-docs/components/status.md +1 -1
  149. package/agent-docs/components/stepper.md +1 -1
  150. package/agent-docs/components/surface.md +1 -1
  151. package/agent-docs/components/swap.md +1 -1
  152. package/agent-docs/components/switch.md +1 -1
  153. package/agent-docs/components/table.md +58 -1
  154. package/agent-docs/components/tabs.md +24 -1
  155. package/agent-docs/components/tag-group.md +1 -1
  156. package/agent-docs/components/text-area.md +1 -1
  157. package/agent-docs/components/text-field.md +1 -1
  158. package/agent-docs/components/text-rotate.md +1 -1
  159. package/agent-docs/components/text-shimmer.md +1 -1
  160. package/agent-docs/components/theme-controller.md +1 -1
  161. package/agent-docs/components/time-field.md +1 -1
  162. package/agent-docs/components/timeline.md +1 -1
  163. package/agent-docs/components/toast.md +1 -1
  164. package/agent-docs/components/toggle-button-group.md +1 -1
  165. package/agent-docs/components/toggle-button.md +1 -1
  166. package/agent-docs/components/toolbar.md +1 -1
  167. package/agent-docs/components/tooltip.md +1 -1
  168. package/agent-docs/components/trend-chip.md +1 -1
  169. package/agent-docs/components/typed-confirmation.md +1 -1
  170. package/agent-docs/components/typography.md +24 -1
  171. package/agent-docs/components/validator.md +1 -1
  172. package/agent-docs/components/visually-hidden.md +27 -0
  173. package/agent-docs/components/widget.md +1 -1
  174. package/agent-docs/components/window-mockup.md +1 -1
  175. package/agent-docs/llms-components.txt +989 -194
  176. package/agent-docs/llms-full.txt +1079 -206
  177. package/agent-docs/llms-patterns.txt +91 -13
  178. package/agent-docs/llms.txt +5 -2
  179. package/package.json +4 -1
  180. package/ui/insight-charts.mjs +1 -1
  181. package/ui/insight-markdown.mjs +1 -1
  182. package/ui/mero-collections.css +1 -7
  183. package/ui/mero-collections.js +1 -1
  184. package/ui/mero-composition.css +1 -1
  185. package/ui/mero-composition.js +1 -1
  186. package/ui/mero-forms.js +415 -27
  187. package/ui/mero-gallery.css +1 -1
  188. package/ui/mero-gallery.js +1 -1
  189. package/ui/mero-insights.css +1 -1
  190. package/ui/mero-insights.js +1 -1
  191. package/ui/mero-inventory.css +1 -1
  192. package/ui/mero-inventory.js +1 -1
  193. package/ui/mero-layouts.css +1 -4
  194. package/ui/mero-live.js +25 -4
  195. package/ui/mero-workspace.css +1 -1
  196. package/ui/mero-workspace.js +1 -1
  197. package/ui/mero.css +104 -5
  198. package/ui/mero.js +220 -8
@@ -1,4 +1,4 @@
1
- # Mero UI 0.7.0 integration patterns
1
+ # Mero UI 0.9.0 integration patterns
2
2
 
3
3
  ## Install a component
4
4
 
@@ -24,15 +24,27 @@ Fires on the `data-mero-listbox` element when a person chooses an option.
24
24
 
25
25
  event.detail: `{ value, option }`. `value` is the option’s `data-value`, or its text when that is absent. `option` is the chosen element.
26
26
 
27
+ ### mero:tab
28
+
29
+ Fires on the newly selected tab when a person changes the tab with a click, an arrow key, Home or End, after the tabs and panels are updated. It does not fire for the tab selected at load, or when the selected tab is chosen again.
30
+
31
+ event.detail: `{ tab, panel }`. `tab` is the selected tab. `panel` is the element its `aria-controls` names, or `null` when there is none.
32
+
33
+ ### mero:toggle
34
+
35
+ Fires on a `data-mero-toggle` button after a click flips its `aria-pressed`.
36
+
37
+ event.detail: `{ pressed }`. `pressed` is the new state, a boolean.
38
+
27
39
  ### mero:query
28
40
 
29
- Fires on a remote combobox input when it needs fresh options, for example an arrow key after a failed request. Add it to `hx-trigger` next to `input`.
41
+ Fires on a remote combobox input when it needs fresh options, for example an arrow key after a failed request. Add it to `hx-trigger` next to `input`. To follow the option a person chooses, listen for the native `change` event on the input, which bubbles; the value is `event.target.value`.
30
42
 
31
43
  ### mero:action
32
44
 
33
- Fires on a `data-mero-action` button when its request starts and when it ends, or on the document when a swap removed the button. Requires `mero-forms.js`.
45
+ Fires on a `data-mero-action` button or a `data-mero-form` when its request starts and when it ends, or on the document when a swap removed the element. Requires `mero-forms.js`.
34
46
 
35
- event.detail: `{ state, status, message }`. `state` is `pending`, `succeeded`, `rejected` or `unknown`. `status` and `message` are set once the request ends.
47
+ event.detail: `{ state, status, message }`. `state` is `pending`, `succeeded`, `rejected` or `unknown`. `status` and `message` are set once the request ends. `status` is 0 when no response arrived.
36
48
 
37
49
  ### mero:refresh
38
50
 
@@ -79,9 +91,9 @@ Opens a `<dialog>` as a modal. Pass the element or its ID. Focus returns to `tri
79
91
 
80
92
  Closes an open dialog. `focus` overrides where focus returns. `value` becomes the dialog’s `returnValue`.
81
93
 
82
- ### MeroUI.toast(message, { tone, duration })
94
+ ### MeroUI.toast(message, { tone, duration, trigger })
83
95
 
84
- Shows a notification. `tone` is `accent`, `success`, `warning` or `danger`. `duration` is in milliseconds, 4800 by default. Use 0 to keep it until dismissed.
96
+ Shows a notification. `tone` is `accent`, `success`, `warning` or `danger`. `duration` is in milliseconds, 4800 by default. Use 0 to keep it until dismissed. `trigger` is the element the notification belongs to, by default the focused element. When it is inside an open dialog, the notification shows in that dialog.
85
97
 
86
98
  ### MeroUI.init(root)
87
99
 
@@ -104,7 +116,7 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
104
116
  - `data-mero-accordion` — On the parent of `<details>` elements. Only one stays open at a time.
105
117
  - `data-mero-radio-group` — Around radios that sit outside a form. Repeated copies with the same `name` stay independent.
106
118
  - `data-mero-radio-owner` (set by Mero) — On the hidden form Mero adds to own those radios.
107
- - `data-mero-scope` — On a repeated snippet or fragment. Mero renames duplicate IDs inside it and updates `for`, ARIA, `popovertarget`, `data-mero-open` and ID selectors in `hx-target`, `data-mero-return-focus` and `data-mero-fallback-focus` to match.
119
+ - `data-mero-scope` — On a repeated snippet or fragment. Mero renames duplicate IDs inside it and updates `for`, ARIA, `popovertarget`, `data-mero-open` and ID selectors in `hx-target`, `data-mero-return-focus`, `data-mero-fallback-focus`, `data-mero-action-unknown`, `data-mero-action-reread` and `data-mero-ephemeral-dismiss` to match.
108
120
  - `data-mero-listbox` — On a `role="listbox"`. Adds arrow-key navigation and selection, and fires `mero:selection`.
109
121
  - `data-mero-combo` — Root of a combobox. Wraps the `role="combobox"` input and its options.
110
122
  - `data-mero-combo-remote` — On the combobox root when the options come from your server. Mero then leaves filtering to the response.
@@ -118,12 +130,20 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
118
130
  - `data-mero-tooltip-below` (set by Mero) — On a tooltip placed below its anchor because there is no room above.
119
131
  - `data-mero-tooltip-dismissed` (set by Mero) — On a tooltip closed with Escape, until the pointer and focus leave it.
120
132
  - `data-mero-cell-label` — On an `aria-hidden="true"` span inside a table cell. Copy its column heading here for the card layout. Add `mero-table-cards` to the table wrapper for cards below 768 px, or `mero-table-cards-wide` for 1024 px. See the [Sortable Table](components/sortable-table.md) for the table roles and sort links.
133
+ - `data-mero-card-hidden` — On a `th` or `td` in a `mero-table-cards` table. Hides that column in the card layout below 768 px, or 1024 px with `mero-table-cards-wide`. Put it on the column's header and on each of its cells. See the [Table](components/table?variant=Cards%20on%20phones.md).
121
134
  - `data-mero-command` — On a `<dialog>` holding a remote combobox. Cmd or Ctrl K opens it with an empty query, and choosing an option runs that option’s link, `hx-*` request or toast. Give the shortcut to one command menu per page, including the workspace Command. Group server results with `role="group"` and `aria-labelledby` pointing to a visible heading. Give each option a unique ID. Up and Down cross groups, Home and End reach the first and last result, and the status counts selectable options. Omit empty groups and return one disabled “No results” option when nothing matches.
122
135
  - `data-mero-peek` — Around a table wrapper whose rows have a `.mero-row-link`. With a row link focused, Space shows the row’s `data-mero-peek-body` template in a Preview panel beside the table, or in a bottom sheet below 768 px. While it is open, Up and Down Arrow move between rows and the panel follows focus. Space or Escape closes it and focuses the row. See the [Sortable Table](components/sortable-table.md) Row peek variant.
123
136
  - `data-mero-peek-body` — On a `<template>` inside a row of a `data-mero-peek` table. Holds the server-rendered preview for that row. Give the row a stable `id` so the preview follows it through swaps; otherwise Mero matches the row link’s `href`.
124
137
  - `data-mero-peek-close` (set by Mero) — On the Close button of the Preview panel Mero adds.
125
138
  - `data-mero-restore-focus` — On a list container. After Back to this page, focuses the link in it that was opened. Links are matched by `href`.
126
- - `data-mero-focus-fallback` — On one control inside a `data-mero-restore-focus` container. Gets focus after an htmx swap when the initiating control has no focusable replacement with the same ID.
139
+ - `data-mero-copy-target` — On a button. A selector for an input, textarea or element whose value or text the button copies, then confirms with a “Copied” notification. When the browser blocks clipboard access, Mero selects the text instead. Prefer it for secrets. See the [Button](components/button.md) Copy to clipboard variant.
140
+ - `data-mero-copy-message` — With `data-mero-copy` or `data-mero-copy-target`. Replaces the “Copied” notification.
141
+ - `data-mero-time` — On a `<time datetime>`. Rewrites its text in the reader’s locale and time zone: `absolute` (date and time), `date`, `time` or `relative` (“5 minutes ago”, refreshed every minute, with the full date in `title`). Render the UTC time as its text for readers without scripts. See the [Typography](components/typography.md) Local time variant.
142
+ - `data-mero-shortcut` — On a control. A single key such as `/` or `n`, or a two-key sequence such as `g r`, that focuses a field or clicks anything else. Ignored while typing in a field, in a menu, list, tab list, grid or combobox, with Ctrl, Cmd or Alt held, and outside an open modal dialog. Mero sets `aria-keyshortcuts` for single keys. See the [Kbd](components/kbd.md) Keyboard shortcuts variant.
143
+ - `data-mero-shortcuts-toggle` — On a checkbox, switch, `menuitemcheckbox` or button. Turns single-key shortcuts off and on for every page in this browser, as WCAG 2.1.4 requires, and removes `aria-keyshortcuts` while they are off. Mero keeps its checked or pressed state in step.
144
+ - `data-mero-focus-fallback` — On one focusable element inside an htmx swap target, or inside a `data-mero-restore-focus` container. When a swap or morph removes the focused element and leaves focus on the page body, Mero focuses the same element if it survived, else the element with its ID, else this fallback. Mero only acts when focus was inside the target as the swap began, never after the person moved focus elsewhere, and a server `autofocus` wins.
145
+ - `data-mero-focus-manual` — On an htmx swap target, or an ancestor. Mero leaves focus after swaps inside it to your own code.
146
+ - `data-mero-boost` — On an element with `hx-boost:inherited`, such as `<body>`. A selector for the region every boosted page contains. The newest boosted GET wins and older ones are aborted; boosted forms that change data are never aborted. A response without the region and without `HX-Redirect`, `HX-Location` or `HX-Refresh`, or a GET that fails without a response, becomes a full page load. When a boosted page swaps in, open dialogs other than static and alert dialogs close, and focus moves to the region unless htmx `autofocus` placed it or the person moved it during the load. See the [Drawer](components/drawer.md) Boosted navigation variant.
127
147
  - `data-mero-pending` — On any element. Shows a `.mero-indicator` inside it, as `.htmx-request` does.
128
148
  - `data-mero-request` — With a pending state. Sets a progress cursor on the element.
129
149
 
@@ -135,22 +155,34 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
135
155
  - `data-mero-confirm-reason` — On the optional reason field. Add `required` to require a non-empty, trimmed value.
136
156
  - `data-mero-confirm-submit` — On the danger submit button. Render it disabled until the phrase and any required reason are ready.
137
157
  - `data-mero-confirm-hint` — A polite status in the form explaining what still needs to be entered. Associate it with the input and the confirm button.
138
- - `data-mero-form` — On a form that htmx submits. Disables its submit buttons while the request runs, swaps in the replacement form on HTTP 422 and focuses the first invalid field.
158
+ - `data-mero-form` — On a form that htmx submits. Disables its submit buttons while the request runs, swaps in the replacement form on HTTP 422 and focuses the first invalid field. Reports the outcome like `data-mero-action`: the submitter gets `data-mero-action-state`, the form fires `mero:action`, and `Mero-Action-Outcome` and `Mero-Action-Message` override the state and the error text. A `mero:form-saved` trigger only acts on a succeeded outcome. A succeeded `Mero-Action-Message` shows as a toast.
159
+ - `data-mero-clear-passwords` — On a `data-mero-form`. Empties its password fields after every response, whatever the outcome, and in the replacement form after a 422.
139
160
  - `data-mero-action` — On a button outside a form that makes an htmx request. Shows its outcome and ignores clicks while the request runs. `Mero-Action-Outcome` and `Mero-Action-Message` response headers override the state and the text.
140
- - `data-mero-action-state` (set by Mero) — On a `data-mero-action` button: `pending`, then `succeeded` (2xx), `rejected` (4xx other than 408) or `unknown` (anything else, including network errors).
161
+ - `data-mero-action-state` (set by Mero) — On a `data-mero-action` button, or on the button that submitted a `data-mero-form` (the form itself when there is none): `pending`, then `succeeded` (2xx), `rejected` (4xx other than 408) or `unknown` (anything else, including network errors, timeouts and a request aborted after it was sent). A request cancelled before it was sent clears the state.
162
+ - `data-mero-action-expect` — On a `data-mero-action` button, a `data-mero-form` or its submit button. A selector the response body must contain. A success without a match becomes `unknown`, is not swapped and does not show the server’s success message. Use it when the response carries something the person cannot get again, such as a new token.
163
+ - `data-mero-action-unknown` — On a `data-mero-action` button, a `data-mero-form` or its submit button. The text to show for an unknown outcome when the server sent no `Mero-Action-Message`, or `#id` of a hidden recovery panel to reveal. Mero hides the panel again when the next request starts. Wrap a `.mero-alert` in the hidden element, because the alert sets its own display.
164
+ - `data-mero-action-reread` — On a `data-mero-action` button, a `data-mero-form` or an ancestor. A selector for the region to read again after an `unknown` outcome. Mero GETs the current page with a `Mero-Reread` request header, morphs the region from the response and shows the unknown message again. It never repeats the action. The answer is dropped when it is not a 2xx, lacks the region, the URL changed or a newer read started. See the [Action Button](components/action-button.md) Re-read after unknown variant.
141
165
  - `data-mero-action-status` — A live region next to the button. Receives the outcome message and a `data-tone`. Without one, the message shows as a toast.
166
+ - `data-mero-search` — On a search or filter form whose htmx GET replaces a list. A failed read never replaces the list: Mero skips the swap of a non-2xx response and of a response without the `hx-select` region, shows a message in `data-mero-search-error` and, once no search is pending, returns selects, checkboxes and radios to the values of the list on screen. Text the person typed stays. A redirected response without the region, such as a login page, loads as a full page. Use `hx-sync="this:replace"` so the newest search wins. See the [Search Field](components/search-field.md) Filtered list variant.
167
+ - `data-mero-search-error` — Inside a `data-mero-search` form. A hidden alert that receives the failure message and hides again after the next successful read. Its attribute value, when set, is the message; otherwise Mero uses `Mero-Form-Error` or a default.
142
168
  - `data-mero-form-error` — Inside the form. Receives the message when a request fails with a status other than 422. Send your own text in a `Mero-Form-Error` response header.
143
169
  - `data-mero-return-focus` — On the form. Selector for the element to focus after `mero:form-saved`.
144
170
  - `data-mero-fallback-focus` — On the form. Selector to focus when the return-focus element is gone.
171
+ - `data-mero-show-when` — On a branch inside a form, ideally a `<fieldset>`. `field=value other` shows the branch while the form’s field has one of the values and hides and disables it otherwise, so its fields neither validate nor submit. Render the right state on the server too. See the [Fieldset](components/fieldset.md) Conditional fields variant.
172
+ - `data-mero-dirty` — On a form. Keeps its submit buttons disabled until a field differs from the value the server rendered, and again once every field is back to that value.
145
173
  - `data-mero-close-all` — On a form in a nested dialog. A save closes the parent dialogs too.
174
+ - `data-mero-hold` — Keeps the page while something the person cannot get back is on its way or on screen. On a `data-mero-form` or `data-mero-action` button it holds while the request is pending. On a `data-mero-ephemeral` element it holds while the element has content. While held, Mero cancels boosted navigation, history restores and requests whose target is the body or contains the held element, undoes Back to another htmx history entry and asks before the page unloads. Requests from controls inside the held content still run. The value is the warning shown as a toast; empty uses a generic text. See the [Form](components/form.md) One-time credential variant.
175
+ - `data-mero-ephemeral` — On the element that receives a one-time secret, such as a new API token. Mero empties it when its dialog closes, when a `data-mero-ephemeral-dismiss` button inside it is activated, and when the page is hidden, so the back-forward cache cannot show it again. Add `data-mero-hold` to keep the page while it has content.
176
+ - `data-mero-ephemeral-dismiss` — On a button inside a `data-mero-ephemeral` element. Empties that element. The optional value is a selector to focus afterwards; otherwise the emptied element takes focus.
146
177
 
147
178
  ### Live progress · mero-live.js
148
179
 
149
180
  - `data-mero-live` — On a region with `hx-get` and `hx-trigger="mero:refresh"`. Its value is the interval in milliseconds, 3000 by default. Polling pauses while the page is hidden. Send `Mero-Live: done` on the final successful response.
150
181
  - `data-mero-live-status` — Use this polite status region as the innerHTML target. Return a status label as an HTML fragment. Mero skips a repeated label so it is announced once.
151
- - `data-mero-live-error` — An initially empty status region that announces a failed read. The last good status stays visible until a successful read.
182
+ - `data-mero-live-error` — An initially empty status region that announces a failed read. The last good status stays visible until a successful read. The attribute value, when set, replaces the default text; `{time}` becomes the time of the last good read in the browser’s locale, or the page load when no read has succeeded yet.
183
+ - `data-mero-live-follow` — On the `data-mero-live` region. An error response with `HX-Redirect`, `HX-Location` or `HX-Refresh: true`, such as a 401 for an expired session, is handed to htmx instead of retried, and polling stops. Without it Mero ignores those headers on an error response and keeps retrying.
152
184
  - `data-mero-live-retry` — On a hidden button. Mero shows it after a failed read. Activating it refreshes the status immediately. If a successful read hides the focused button, focus returns to the region.
153
- - `data-mero-live-done` — On an operation with a final status. Mero sets it after a successful response with the terminal header. Render it yourself if the operation has already finished.
185
+ - `data-mero-live-done` (set by Mero) — On an operation with a final status. Mero sets it after a successful response with the terminal header, and after following a redirect with `data-mero-live-follow`. Render it yourself if the operation has already finished.
154
186
 
155
187
  ### Gallery · mero-gallery.js
156
188
 
@@ -182,7 +214,7 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
182
214
  - `data-mero-series` — On each chart mark. Arrow up and down move between series at the same category.
183
215
  - `data-mero-plot-readout` — Receives the text of the active mark for assistive technology.
184
216
  - `data-mero-plot-tooltip` — The tooltip positioned at the active mark.
185
- - `data-mero-copy` — On a button in a code block or chat message. Copies the code or the message text.
217
+ - `data-mero-copy` — On a button in a code block or chat message, empty: copies the code or the message text (`mero-insights.js`). With a value, on any button: copies that text and confirms it with a notification (`mero.js`).
186
218
  - `data-mero-copy-label` (set by Mero) — On a copy button. Its original label, restored after “Copied”.
187
219
  - `data-mero-message-text` — Inside a chat message. The text a copy button copies.
188
220
  - `data-mero-reaction` — On a reaction button. Toggles `aria-pressed`, updates the count and fires `mero:reaction`.
@@ -229,9 +261,55 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
229
261
  - `data-mero-cutoff-hour` — Around a `<time>`. Counts down to that hour, 0 to 23 in UTC.
230
262
  - `data-mero-check-form` — On the catalog’s validation demo form. It reports a fixed message and is not meant for your app.
231
263
 
264
+ ## State Mero owns
265
+
266
+ The native and ARIA state Mero writes besides the attributes marked set by Mero above. Render the starting state in your markup, then leave these to Mero: a second writer and Mero overwrite each other. This list covers `mero.js`, `mero-forms.js` and `mero-live.js`. The state the other scripts write is not listed.
267
+
268
+ - Dialog (mero.js) — The `open` state of a dialog opened with `data-mero-open` or `MeroUI.open`.
269
+ - Scoped IDs (mero.js) — Inside a `data-mero-scope` or `data-mero-tabs`: the `id` of an element whose ID is already used elsewhere on the page, and every reference to it in that scope: `for`, `aria-controls`, `aria-labelledby`, `aria-describedby`, `aria-activedescendant`, `popovertarget`, `data-mero-open` and the ID selectors `data-mero-scope` lists. Read these from the element. Do not write back the ID you rendered.
270
+ - Tabs (mero.js) — `aria-selected` and `tabindex` on each tab, and `hidden` on each panel a tab names in `aria-controls`.
271
+ - List box (mero.js) — `aria-selected` and `tabindex` on each option.
272
+ - Combobox (mero.js) — On the input: `aria-expanded`, `aria-activedescendant` and, while a remote query runs, `aria-busy`. On the list it controls: `hidden` on the list, on options that do not match and on the empty row, and `aria-selected` on options. The input’s value when a person chooses an option. Opening a `data-mero-command` dialog clears its combobox input.
273
+ - Accordion (mero.js) — The `name` of each `details` directly inside a `data-mero-accordion`.
274
+ - Toggle button (mero.js) — `aria-pressed` on a `data-mero-toggle` button.
275
+ - Menu (mero.js) — `aria-expanded` on the button that opens a popover with `role="menu"`.
276
+ - Shortcuts (mero.js) — `aria-keyshortcuts` on a `data-mero-shortcut` element. On a `data-mero-shortcuts-toggle`: `checked` on a checkbox, otherwise `aria-checked` or `aria-pressed`.
277
+ - Radio group (mero.js) — For a `data-mero-radio-group` outside a form: the `form` attribute on each radio, pointing at a hidden form Mero adds, and `checked` on the selected radio.
278
+ - Toast and peek (mero.js) — Mero creates these elements and sets their `role`, `aria-label`, `aria-live` and `aria-hidden`.
279
+ - Form (mero-forms.js) — On a `data-mero-form` while its request runs: `aria-busy` on the form and `disabled` on its submit buttons. `hidden` on its `data-mero-form-error` element and on a `data-mero-action-unknown` panel. With `data-mero-clear-passwords`: the value of its password inputs, cleared when the request ends unless it was cancelled.
280
+ - Action button (mero-forms.js) — On a `data-mero-action` button while its request runs: `aria-busy` and `aria-disabled`. `hidden` on a `data-mero-action-unknown` panel, and `hidden` and `data-tone` on `data-mero-action-status`. `aria-busy` on the region a `data-mero-action-reread` selector names, while Mero reads it again. That is the selected region, not the button, form or ancestor that carries the attribute, and it applies to a `data-mero-form` too.
281
+ - Typed confirmation (mero-forms.js) — `disabled` on `data-mero-confirm-submit`. The value of `data-mero-confirm-input`, cleared when its dialog closes.
282
+ - Show-when (mero-forms.js) — `hidden` on the branch, and `disabled` on a fieldset branch and on the controls inside a branch.
283
+ - Dirty (mero-forms.js) — `disabled` on the submit buttons of a `data-mero-dirty` form.
284
+ - Search (mero-forms.js) — `hidden` on `data-mero-search-error`. After a successful read: `defaultSelected` on each option and `defaultChecked` on each checkbox and radio of the form, set to the current choice, so a form reset returns to the last search that worked. After a failed read: `selected` and `checked`, put back to those defaults.
285
+ - Live progress (mero-live.js) — `aria-busy` on the `data-mero-live` region while a read runs, and `hidden` on `data-mero-live-retry`.
286
+ - Focus targets (mero.js, mero-forms.js, mero-live.js) — `tabindex="-1"` on a region Mero moves focus to when it has no `tabindex`: the boosted region, a `data-mero-live` region and an emptied `data-mero-ephemeral` element.
287
+
288
+ ## Headers
289
+
290
+ The `Mero-*` HTTP headers. Your server sends the response headers. Mero sends the request header.
291
+
292
+ - `Mero-Action-Outcome` (response, mero-forms.js) — `succeeded`, `rejected` or `unknown`. Overrides the outcome Mero derives from the status code of a `data-mero-action` or `data-mero-form` request. Any other value is ignored.
293
+ - `Mero-Action-Message` (response, mero-forms.js) — Text to show for the outcome of a `data-mero-action` or `data-mero-form` request.
294
+ - `Mero-Form-Error` (response, mero-forms.js) — Fallback text for a failed request. A form shows it when there is no `Mero-Action-Message` and no `data-mero-action-unknown` text, and never for a 422 without `Mero-Action-Outcome`, where the replacement form shows its own errors. A search shows it when `data-mero-search-error` has no value.
295
+ - `Mero-Live` (response, mero-live.js) — `done` on the final successful read of a `data-mero-live` region. Polling stops.
296
+ - `Mero-Reread` (request, mero-forms.js) — A number Mero sends with the GET that reads again the region a `data-mero-action-reread` selector names.
297
+
298
+ ## With Alpine or your own scripts
299
+
300
+ What a browser test proves about Mero next to Alpine. It runs Alpine 3.14.8, the oldest version tested, and Alpine 3.17.5, with htmx 4.0.2 and its `hx-alpine-compat` extension loaded straight after htmx. Other Alpine versions and setups without the extension are not tested. The events are listed under “Events Mero sends”.
301
+
302
+ - Script order — With Mero and Alpine both loaded as deferred scripts, either order works.
303
+ - Listen, do not read — Put `x-on:mero:selection`, `x-on:mero:tab` or `x-on:mero:toggle` on an `x-data` ancestor of the component. The event arrives after Mero has written the state, so the listener sees the new state. Mero selecting a tab or flipping a toggle inside an `x-data` root leaves Alpine’s own state alone.
304
+ - mero:action — For a form that stays in the page, or that a 422 response replaces with another `data-mero-form`, a listener on an ancestor hears both the pending and the final event. When the swap removes the form and leaves no replacement `data-mero-form`, the final event fires on the document. An ancestor listener misses it. Use `@mero:action.window` on an Alpine component or a native listener on `document`. The detail is `{ state }` while pending and `{ state, status, message }` at the end. It does not say which form or button it came from, and a window or document listener hears every action on the page, so it cannot tell which one settled once the element is gone. Tested with `data-mero-form`.
305
+ - Combobox — Use `x-model.lazy` on the combobox input. Choosing an option fires `change` and no `input` event.
306
+ - Writing a field value — A script that sets an input’s value fires no event. Dispatch a bubbling `change` on the input afterwards, or `data-mero-dirty` and `data-mero-show-when` keep their old state.
307
+ - htmx swaps — After an `innerHTML` swap into an `x-data` element, and after an `outerMorph` swap of one with `hx-alpine-compat` loaded, the Alpine state survives, Alpine binds the new children and Mero sets up the tabs in the new content.
308
+ - Markup Alpine inserts — Mero does not set up tabs that `x-if` inserts. Call `MeroUI.init(el)` on the inserted element. A second call changes nothing.
309
+
232
310
  # Carousel
233
311
 
234
- Mero UI 0.7.0 · Media galleries
312
+ Mero UI 0.9.0 · Media galleries
235
313
 
236
314
  Browse product photography with native scroll snap, thumbnails and keyboard controls.
237
315
 
@@ -308,7 +386,7 @@ Template
308
386
 
309
387
  # Hover Gallery
310
388
 
311
- Mero UI 0.7.0 · Media galleries
389
+ Mero UI 0.9.0 · Media galleries
312
390
 
313
391
  Explore the shade, base and profile of a product with a pointer, touch or keyboard.
314
392
 
@@ -385,7 +463,7 @@ Template
385
463
 
386
464
  # Image Diff
387
465
 
388
- Mero UI 0.7.0 · Media galleries
466
+ Mero UI 0.9.0 · Media galleries
389
467
 
390
468
  Reveal two finishes at the same position using an accessible comparison slider.
391
469
 
@@ -427,7 +505,7 @@ Template
427
505
 
428
506
  # Holo Card
429
507
 
430
- Mero UI 0.7.0 · Media galleries
508
+ Mero UI 0.9.0 · Media galleries
431
509
 
432
510
  Catch a material sample in a shifting foil reflection.
433
511
 
@@ -459,7 +537,7 @@ Template
459
537
 
460
538
  # Data Grid
461
539
 
462
- Mero UI 0.7.0 · Studio collections
540
+ Mero UI 0.9.0 · Studio collections
463
541
 
464
542
  Search, sort, select and edit products in a server-rendered collection.
465
543
 
@@ -617,7 +695,7 @@ Template
617
695
 
618
696
  # Action Bar
619
697
 
620
- Mero UI 0.7.0 · Studio collections
698
+ Mero UI 0.9.0 · Studio collections
621
699
 
622
700
  Select records and apply one status change to the selection.
623
701
 
@@ -661,7 +739,7 @@ Template
661
739
 
662
740
  # Agenda
663
741
 
664
- Mero UI 0.7.0 · Studio collections
742
+ Mero UI 0.9.0 · Studio collections
665
743
 
666
744
  Browse daily bookings and add a timed event.
667
745
 
@@ -696,32 +774,9 @@ Template
696
774
  </section></div>
697
775
  ````
698
776
 
699
- # Empty State
700
-
701
- Mero UI 0.7.0 · Studio collections
702
-
703
- Explain an empty result and give the user a relevant next action.
704
-
705
- ## Default
706
-
707
- Page assets
708
-
709
- ```html
710
- <link rel="stylesheet" href="/mero.css">
711
- <link rel="stylesheet" href="/mero-collections.css">
712
- <script defer src="/mero.js"></script>
713
- <script defer src="/mero-collections.js"></script>
714
- ```
715
-
716
- Template
717
-
718
- ````html
719
- <section class="mero-collection-empty"><div class="mero-empty-state"><span class="mero-empty-glyph" aria-hidden="true"></span><strong>No products in this collection</strong><p>Add the first product to start tracking inventory.</p></div><a class="mero-button mero-button-primary mero-button-sm" href="/components/data-grid">Open inventory</a></section>
720
- ````
721
-
722
777
  # File Tree
723
778
 
724
- Mero UI 0.7.0 · Studio collections
779
+ Mero UI 0.9.0 · Studio collections
725
780
 
726
781
  Expand folders and preview a selected file with native disclosure controls.
727
782
 
@@ -744,7 +799,7 @@ Template
744
799
 
745
800
  # Floating TOC
746
801
 
747
- Mero UI 0.7.0 · Studio collections
802
+ Mero UI 0.9.0 · Studio collections
748
803
 
749
804
  Navigate to sections with an index that follows the reading position.
750
805
 
@@ -767,7 +822,7 @@ Template
767
822
 
768
823
  # Hover Card
769
824
 
770
- Mero UI 0.7.0 · Studio collections
825
+ Mero UI 0.9.0 · Studio collections
771
826
 
772
827
  Preview a contributor on hover, focus or tap.
773
828
 
@@ -792,7 +847,7 @@ Template
792
847
 
793
848
  # Item Card
794
849
 
795
- Mero UI 0.7.0 · Studio collections
850
+ Mero UI 0.9.0 · Studio collections
796
851
 
797
852
  Give a related destination an identity, title and supporting detail.
798
853
 
@@ -815,7 +870,7 @@ Template
815
870
 
816
871
  # Item Card Group
817
872
 
818
- Mero UI 0.7.0 · Studio collections
873
+ Mero UI 0.9.0 · Studio collections
819
874
 
820
875
  Arrange related destinations into a responsive group.
821
876
 
@@ -838,7 +893,7 @@ Template
838
893
 
839
894
  # Kanban
840
895
 
841
- Mero UI 0.7.0 · Studio collections
896
+ Mero UI 0.9.0 · Studio collections
842
897
 
843
898
  Move a card between stages with a drag or its Move to menu.
844
899
 
@@ -863,7 +918,7 @@ Template
863
918
 
864
919
  # List View
865
920
 
866
- Mero UI 0.7.0 · Studio collections
921
+ Mero UI 0.9.0 · Studio collections
867
922
 
868
923
  Browse structured destinations in a compact keyboard-accessible list.
869
924
 
@@ -886,7 +941,7 @@ Template
886
941
 
887
942
  # Map
888
943
 
889
- Mero UI 0.7.0 · Studio collections
944
+ Mero UI 0.9.0 · Studio collections
890
945
 
891
946
  Choose a location on a self-contained campus map and read its address.
892
947
 
@@ -911,7 +966,7 @@ Template
911
966
 
912
967
  # Timeline
913
968
 
914
- Mero UI 0.7.0 · Studio collections
969
+ Mero UI 0.9.0 · Studio collections
915
970
 
916
971
  Present milestones in order and identify the current step.
917
972
 
@@ -934,7 +989,7 @@ Template
934
989
 
935
990
  # Widget
936
991
 
937
- Mero UI 0.7.0 · Studio collections
992
+ Mero UI 0.9.0 · Studio collections
938
993
 
939
994
  Use a dashboard panel to track a checklist and its progress.
940
995
 
@@ -957,7 +1012,7 @@ Template
957
1012
 
958
1013
  # Cell Color Picker
959
1014
 
960
- Mero UI 0.7.0 · Workspace forms
1015
+ Mero UI 0.9.0 · Workspace forms
961
1016
 
962
1017
  Change one preference and receive inline confirmation from the server.
963
1018
 
@@ -988,7 +1043,7 @@ Template
988
1043
 
989
1044
  # Cell Select
990
1045
 
991
- Mero UI 0.7.0 · Workspace forms
1046
+ Mero UI 0.9.0 · Workspace forms
992
1047
 
993
1048
  Change one preference and receive inline confirmation from the server.
994
1049
 
@@ -1019,7 +1074,7 @@ Template
1019
1074
 
1020
1075
  # Cell Slider
1021
1076
 
1022
- Mero UI 0.7.0 · Workspace forms
1077
+ Mero UI 0.9.0 · Workspace forms
1023
1078
 
1024
1079
  Change one preference and receive inline confirmation from the server.
1025
1080
 
@@ -1050,7 +1105,7 @@ Template
1050
1105
 
1051
1106
  # Cell Switch
1052
1107
 
1053
- Mero UI 0.7.0 · Workspace forms
1108
+ Mero UI 0.9.0 · Workspace forms
1054
1109
 
1055
1110
  Change one preference and receive inline confirmation from the server.
1056
1111
 
@@ -1081,7 +1136,7 @@ Template
1081
1136
 
1082
1137
  # Checkbox Button Group
1083
1138
 
1084
- Mero UI 0.7.0 · Workspace forms
1139
+ Mero UI 0.9.0 · Workspace forms
1085
1140
 
1086
1141
  Select several release channels using native checkboxes.
1087
1142
 
@@ -1109,7 +1164,7 @@ Template
1109
1164
 
1110
1165
  # Radio Button Group
1111
1166
 
1112
- Mero UI 0.7.0 · Workspace forms
1167
+ Mero UI 0.9.0 · Workspace forms
1113
1168
 
1114
1169
  Choose one release schedule with labelled option cards.
1115
1170
 
@@ -1136,7 +1191,7 @@ Template
1136
1191
 
1137
1192
  # Native Select
1138
1193
 
1139
- Mero UI 0.7.0 · Workspace forms
1194
+ Mero UI 0.9.0 · Workspace forms
1140
1195
 
1141
1196
  Choose a workspace from labelled option groups.
1142
1197
 
@@ -1161,7 +1216,7 @@ Template
1161
1216
 
1162
1217
  # Inline Select
1163
1218
 
1164
- Mero UI 0.7.0 · Workspace forms
1219
+ Mero UI 0.9.0 · Workspace forms
1165
1220
 
1166
1221
  Change an audience within the sentence that describes it.
1167
1222
 
@@ -1186,7 +1241,7 @@ Template
1186
1241
 
1187
1242
  # Number Stepper
1188
1243
 
1189
- Mero UI 0.7.0 · Workspace forms
1244
+ Mero UI 0.9.0 · Workspace forms
1190
1245
 
1191
1246
  Change a bounded quantity with the keyboard or step buttons.
1192
1247
 
@@ -1216,7 +1271,7 @@ Template
1216
1271
 
1217
1272
  # File Input
1218
1273
 
1219
- Mero UI 0.7.0 · Workspace forms
1274
+ Mero UI 0.9.0 · Workspace forms
1220
1275
 
1221
1276
  Choose a local product image and validate it on the server.
1222
1277
 
@@ -1247,7 +1302,7 @@ Template
1247
1302
 
1248
1303
  # Drop Zone
1249
1304
 
1250
- Mero UI 0.7.0 · Workspace forms
1305
+ Mero UI 0.9.0 · Workspace forms
1251
1306
 
1252
1307
  Drop an image or use the native file picker and check the file.
1253
1308
 
@@ -1280,7 +1335,7 @@ Template
1280
1335
 
1281
1336
  # Rich Text Editor
1282
1337
 
1283
- Mero UI 0.7.0 · Workspace forms
1338
+ Mero UI 0.9.0 · Workspace forms
1284
1339
 
1285
1340
  Edit a short description with bold and italic text and preview the submitted result.
1286
1341
 
@@ -1314,7 +1369,7 @@ Template
1314
1369
 
1315
1370
  # Joined Filter
1316
1371
 
1317
- Mero UI 0.7.0 · Workspace forms
1372
+ Mero UI 0.9.0 · Workspace forms
1318
1373
 
1319
1374
  Search and filter releases with one server request.
1320
1375
 
@@ -1341,7 +1396,7 @@ Template
1341
1396
 
1342
1397
  # App Layout
1343
1398
 
1344
- Mero UI 0.7.0 · Workspace navigation
1399
+ Mero UI 0.9.0 · Workspace navigation
1345
1400
 
1346
1401
  A responsive workspace with a sidebar, content area and mobile navigation drawer.
1347
1402
 
@@ -1376,7 +1431,7 @@ Template
1376
1431
 
1377
1432
  # Sidebar
1378
1433
 
1379
- Mero UI 0.7.0 · Workspace navigation
1434
+ Mero UI 0.9.0 · Workspace navigation
1380
1435
 
1381
1436
  Navigate the workspace from a side rail that becomes a drawer at narrow widths.
1382
1437
 
@@ -1411,7 +1466,7 @@ Template
1411
1466
 
1412
1467
  # Navbar
1413
1468
 
1414
- Mero UI 0.7.0 · Workspace navigation
1469
+ Mero UI 0.9.0 · Workspace navigation
1415
1470
 
1416
1471
  Place the workspace name and destinations in a wrapping top bar.
1417
1472
 
@@ -1434,7 +1489,7 @@ Template
1434
1489
 
1435
1490
  # Command
1436
1491
 
1437
- Mero UI 0.7.0 · Workspace navigation
1492
+ Mero UI 0.9.0 · Workspace navigation
1438
1493
 
1439
1494
  Search destinations and actions, then use the arrows and Enter to execute.
1440
1495
 
@@ -1471,7 +1526,7 @@ Template
1471
1526
 
1472
1527
  # Context Menu
1473
1528
 
1474
- Mero UI 0.7.0 · Workspace navigation
1529
+ Mero UI 0.9.0 · Workspace navigation
1475
1530
 
1476
1531
  Open item actions with the visible button, a secondary click, or Shift F10.
1477
1532
 
@@ -1501,7 +1556,7 @@ Template
1501
1556
 
1502
1557
  # Segment
1503
1558
 
1504
- Mero UI 0.7.0 · Workspace navigation
1559
+ Mero UI 0.9.0 · Workspace navigation
1505
1560
 
1506
1561
  Choose one display density in a compact segmented control.
1507
1562
 
@@ -1528,7 +1583,7 @@ Template
1528
1583
 
1529
1584
  # Stepper
1530
1585
 
1531
- Mero UI 0.7.0 · Workspace navigation
1586
+ Mero UI 0.9.0 · Workspace navigation
1532
1587
 
1533
1588
  Move through validated project details and review the values before submitting.
1534
1589
 
@@ -1559,7 +1614,7 @@ Template
1559
1614
 
1560
1615
  # Dock
1561
1616
 
1562
- Mero UI 0.7.0 · Workspace navigation
1617
+ Mero UI 0.9.0 · Workspace navigation
1563
1618
 
1564
1619
  Group frequently used workspace destinations in a compact navigation dock.
1565
1620
 
@@ -1584,7 +1639,7 @@ Template
1584
1639
 
1585
1640
  # Megamenu
1586
1641
 
1587
- Mero UI 0.7.0 · Workspace navigation
1642
+ Mero UI 0.9.0 · Workspace navigation
1588
1643
 
1589
1644
  Explore grouped destinations from a native disclosure.
1590
1645
 
@@ -1609,7 +1664,7 @@ Template
1609
1664
 
1610
1665
  # Floating Action Button
1611
1666
 
1612
- Mero UI 0.7.0 · Workspace navigation
1667
+ Mero UI 0.9.0 · Workspace navigation
1613
1668
 
1614
1669
  Reveal a small set of workspace shortcuts.
1615
1670
 
@@ -1634,7 +1689,7 @@ Template
1634
1689
 
1635
1690
  # Resizable
1636
1691
 
1637
- Mero UI 0.7.0 · Workspace tools
1692
+ Mero UI 0.9.0 · Workspace tools
1638
1693
 
1639
1694
  Resize two adjacent panels by dragging the divider or using the arrow keys.
1640
1695
 
@@ -1688,7 +1743,7 @@ Template
1688
1743
 
1689
1744
  # Emoji Picker
1690
1745
 
1691
- Mero UI 0.7.0 · Workspace tools
1746
+ Mero UI 0.9.0 · Workspace tools
1692
1747
 
1693
1748
  Search named reactions and submit the selected emoji as a form value.
1694
1749
 
@@ -1718,7 +1773,7 @@ Template
1718
1773
 
1719
1774
  # Area Chart
1720
1775
 
1721
- Mero UI 0.7.0 · Charts
1776
+ Mero UI 0.9.0 · Charts
1722
1777
 
1723
1778
  Show the volume and shape of a series over time.
1724
1779
 
@@ -1753,7 +1808,7 @@ Template
1753
1808
 
1754
1809
  # Bar Chart
1755
1810
 
1756
- Mero UI 0.7.0 · Charts
1811
+ Mero UI 0.9.0 · Charts
1757
1812
 
1758
1813
  Compare adjacent categories on a shared linear scale.
1759
1814
 
@@ -1788,7 +1843,7 @@ Template
1788
1843
 
1789
1844
  # Chart Tooltip
1790
1845
 
1791
- Mero UI 0.7.0 · Charts
1846
+ Mero UI 0.9.0 · Charts
1792
1847
 
1793
1848
  Inspect the active data point using a pointer or keyboard.
1794
1849
 
@@ -1823,7 +1878,7 @@ Template
1823
1878
 
1824
1879
  # Composed Chart
1825
1880
 
1826
- Mero UI 0.7.0 · Charts
1881
+ Mero UI 0.9.0 · Charts
1827
1882
 
1828
1883
  Compare actual volume with its target using columns and a line.
1829
1884
 
@@ -1858,7 +1913,7 @@ Template
1858
1913
 
1859
1914
  # Line Chart
1860
1915
 
1861
- Mero UI 0.7.0 · Charts
1916
+ Mero UI 0.9.0 · Charts
1862
1917
 
1863
1918
  Trace changes across a reporting period.
1864
1919
 
@@ -1921,7 +1976,7 @@ Template
1921
1976
 
1922
1977
  # Pie Chart
1923
1978
 
1924
- Mero UI 0.7.0 · Charts
1979
+ Mero UI 0.9.0 · Charts
1925
1980
 
1926
1981
  See how each collection contributes to total volume.
1927
1982
 
@@ -1956,7 +2011,7 @@ Template
1956
2011
 
1957
2012
  # Radar Chart
1958
2013
 
1959
- Mero UI 0.7.0 · Charts
2014
+ Mero UI 0.9.0 · Charts
1960
2015
 
1961
2016
  Compare profiles across axes that use the same units.
1962
2017
 
@@ -1991,7 +2046,7 @@ Template
1991
2046
 
1992
2047
  # Radial Chart
1993
2048
 
1994
- Mero UI 0.7.0 · Charts
2049
+ Mero UI 0.9.0 · Charts
1995
2050
 
1996
2051
  Compare categories as concentric rings against the largest category.
1997
2052
 
@@ -2026,7 +2081,7 @@ Template
2026
2081
 
2027
2082
  # KPI
2028
2083
 
2029
- Mero UI 0.7.0 · Metrics
2084
+ Mero UI 0.9.0 · Metrics
2030
2085
 
2031
2086
  Pair an exact figure with the reporting period it describes.
2032
2087
 
@@ -2049,7 +2104,7 @@ Template
2049
2104
 
2050
2105
  # KPI Group
2051
2106
 
2052
- Mero UI 0.7.0 · Metrics
2107
+ Mero UI 0.9.0 · Metrics
2053
2108
 
2054
2109
  Keep related measures on a common reporting period.
2055
2110
 
@@ -2072,7 +2127,7 @@ Template
2072
2127
 
2073
2128
  # Emoji Reaction Button
2074
2129
 
2075
- Mero UI 0.7.0 · Interaction feedback
2130
+ Mero UI 0.9.0 · Interaction feedback
2076
2131
 
2077
2132
  Add or remove a reaction while keeping its count visible.
2078
2133
 
@@ -2097,7 +2152,7 @@ Template
2097
2152
 
2098
2153
  # Number Value
2099
2154
 
2100
- Mero UI 0.7.0 · Interaction feedback
2155
+ Mero UI 0.9.0 · Interaction feedback
2101
2156
 
2102
2157
  Display a localized number with its machine-readable value.
2103
2158
 
@@ -2122,7 +2177,7 @@ Template
2122
2177
 
2123
2178
  # Pressable Feedback
2124
2179
 
2125
- Mero UI 0.7.0 · Interaction feedback
2180
+ Mero UI 0.9.0 · Interaction feedback
2126
2181
 
2127
2182
  Give a press a tactile response and keep its selected state visible.
2128
2183
 
@@ -2145,7 +2200,7 @@ Template
2145
2200
 
2146
2201
  # Rating
2147
2202
 
2148
- Mero UI 0.7.0 · Interaction feedback
2203
+ Mero UI 0.9.0 · Interaction feedback
2149
2204
 
2150
2205
  Choose a labelled score using native radio controls.
2151
2206
 
@@ -2170,7 +2225,7 @@ Template
2170
2225
 
2171
2226
  # Trend Chip
2172
2227
 
2173
- Mero UI 0.7.0 · Interaction feedback
2228
+ Mero UI 0.9.0 · Interaction feedback
2174
2229
 
2175
2230
  Label the direction and magnitude of a change.
2176
2231
 
@@ -2193,7 +2248,7 @@ Template
2193
2248
 
2194
2249
  # Chain Of Thought
2195
2250
 
2196
- Mero UI 0.7.0 · Conversation
2251
+ Mero UI 0.9.0 · Conversation
2197
2252
 
2198
2253
  Display a disclosure of observable execution steps for a report.
2199
2254
 
@@ -2218,7 +2273,7 @@ Template
2218
2273
 
2219
2274
  # Chat Attachment
2220
2275
 
2221
- Mero UI 0.7.0 · Conversation
2276
+ Mero UI 0.9.0 · Conversation
2222
2277
 
2223
2278
  Display a named file and provide a working download.
2224
2279
 
@@ -2243,7 +2298,7 @@ Template
2243
2298
 
2244
2299
  # Chat Conversation
2245
2300
 
2246
- Mero UI 0.7.0 · Conversation
2301
+ Mero UI 0.9.0 · Conversation
2247
2302
 
2248
2303
  Keep messages, controls and a composer in one scoped conversation.
2249
2304
 
@@ -2303,7 +2358,7 @@ Template
2303
2358
 
2304
2359
  # Chat List View
2305
2360
 
2306
- Mero UI 0.7.0 · Conversation
2361
+ Mero UI 0.9.0 · Conversation
2307
2362
 
2308
2363
  Open a conversation returned by the server.
2309
2364
 
@@ -2327,7 +2382,7 @@ Template
2327
2382
 
2328
2383
  # Chat Loader
2329
2384
 
2330
- Mero UI 0.7.0 · Conversation
2385
+ Mero UI 0.9.0 · Conversation
2331
2386
 
2332
2387
  Show a concise status while a response is being prepared.
2333
2388
 
@@ -2350,7 +2405,7 @@ Template
2350
2405
 
2351
2406
  # Chat Message
2352
2407
 
2353
- Mero UI 0.7.0 · Conversation
2408
+ Mero UI 0.9.0 · Conversation
2354
2409
 
2355
2410
  Distinguish the sender and keep the message readable after a swap.
2356
2411
 
@@ -2373,7 +2428,7 @@ Template
2373
2428
 
2374
2429
  # Chat Message Actions
2375
2430
 
2376
- Mero UI 0.7.0 · Conversation
2431
+ Mero UI 0.9.0 · Conversation
2377
2432
 
2378
2433
  Copy a reply or mark it as helpful.
2379
2434
 
@@ -2397,7 +2452,7 @@ Template
2397
2452
 
2398
2453
  # Chat Source
2399
2454
 
2400
- Mero UI 0.7.0 · Conversation
2455
+ Mero UI 0.9.0 · Conversation
2401
2456
 
2402
2457
  Open the exact data behind a generated summary.
2403
2458
 
@@ -2420,7 +2475,7 @@ Template
2420
2475
 
2421
2476
  # Chat Tool
2422
2477
 
2423
- Mero UI 0.7.0 · Conversation
2478
+ Mero UI 0.9.0 · Conversation
2424
2479
 
2425
2480
  Disclose the inputs and output of an application action.
2426
2481
 
@@ -2460,7 +2515,7 @@ Template
2460
2515
 
2461
2516
  # Code Block
2462
2517
 
2463
- Mero UI 0.7.0 · Conversation
2518
+ Mero UI 0.9.0 · Conversation
2464
2519
 
2465
2520
  Show a file caption, selectable code and a copy control.
2466
2521
 
@@ -2483,7 +2538,7 @@ Template
2483
2538
 
2484
2539
  # Markdown
2485
2540
 
2486
- Mero UI 0.7.0 · Conversation
2541
+ Mero UI 0.9.0 · Conversation
2487
2542
 
2488
2543
  Render a small safe subset of Markdown into semantic HTML.
2489
2544
 
@@ -2518,7 +2573,7 @@ Template
2518
2573
 
2519
2574
  # Prompt Input
2520
2575
 
2521
- Mero UI 0.7.0 · Conversation
2576
+ Mero UI 0.9.0 · Conversation
2522
2577
 
2523
2578
  Collect a question and submit it to a server-rendered response endpoint.
2524
2579
 
@@ -2549,7 +2604,7 @@ Template
2549
2604
 
2550
2605
  # Prompt Suggestion
2551
2606
 
2552
- Mero UI 0.7.0 · Conversation
2607
+ Mero UI 0.9.0 · Conversation
2553
2608
 
2554
2609
  Choose a suggested prompt, edit it, then send it.
2555
2610
 
@@ -2580,7 +2635,7 @@ Template
2580
2635
 
2581
2636
  # Text Shimmer
2582
2637
 
2583
- Mero UI 0.7.0 · Conversation
2638
+ Mero UI 0.9.0 · Conversation
2584
2639
 
2585
2640
  Indicate work in progress with a moving highlight across readable text.
2586
2641
 
@@ -2603,7 +2658,7 @@ Template
2603
2658
 
2604
2659
  # Button
2605
2660
 
2606
- Mero UI 0.7.0 · Buttons
2661
+ Mero UI 0.9.0 · Buttons
2607
2662
 
2608
2663
  Trigger an action with a consistent hierarchy of visual emphasis.
2609
2664
 
@@ -2626,6 +2681,37 @@ Template
2626
2681
  </div>
2627
2682
  ````
2628
2683
 
2684
+ ## Copy to clipboard
2685
+
2686
+ Copy an ID or a field’s value and confirm it with a notification.
2687
+
2688
+ data-mero-copy holds the text to copy. data-mero-copy-target names an input, textarea or element whose value or text to copy, which suits secrets, because nothing is repeated in the markup and the text can be selected when the browser blocks clipboard access. data-mero-copy-message replaces the “Copied” notification. The label stays the same, so an aria-label keeps working.
2689
+
2690
+ Page assets
2691
+
2692
+ ```html
2693
+ <link rel="stylesheet" href="/mero.css">
2694
+ <script defer src="/mero.js"></script>
2695
+ ```
2696
+
2697
+ Template
2698
+
2699
+ ````html
2700
+ <div class="mero-scope" data-mero-scope>
2701
+ <div class="mero-stack">
2702
+ <div class="mero-field">
2703
+ <label class="mero-label" for="copy-demo-key">Publishable key</label>
2704
+ <div class="mero-input-group">
2705
+ <input class="mero-input" id="copy-demo-key" value="pk_live_51HcX2eDeploy" readonly>
2706
+ <button class="mero-button mero-button-ghost mero-button-sm" type="button" data-mero-copy-target="#copy-demo-key" aria-label="Copy publishable key">Copy</button>
2707
+ </div>
2708
+ </div>
2709
+ <p class="mero-row">Environment <code>env_7f3a91</code>
2710
+ <button class="mero-button mero-button-ghost mero-button-sm" type="button" data-mero-copy="env_7f3a91" aria-label="Copy environment ID">Copy</button></p>
2711
+ </div>
2712
+ </div>
2713
+ ````
2714
+
2629
2715
  ## Compact actions
2630
2716
 
2631
2717
  Page assets
@@ -2677,7 +2763,7 @@ Template
2677
2763
 
2678
2764
  # Action Button
2679
2765
 
2680
- Mero UI 0.7.0 · Buttons
2766
+ Mero UI 0.9.0 · Buttons
2681
2767
 
2682
2768
  Run a server action and report whether it succeeded, was refused or has an unknown result.
2683
2769
 
@@ -2716,9 +2802,40 @@ Template
2716
2802
  </div>
2717
2803
  ````
2718
2804
 
2805
+ ## Re-read after unknown
2806
+
2807
+ Read the current state again after an unknown outcome, without repeating the action.
2808
+
2809
+ This endpoint restarts the export and then answers 504, as a gateway timeout would. data-mero-action-reread names the region to read again: Mero GETs the current page, morphs that region and shows the unknown message again. It never re-sends the POST. A response for another page, an error or a page without the region is dropped.
2810
+
2811
+ Page assets
2812
+
2813
+ ```html
2814
+ <link rel="stylesheet" href="/mero.css">
2815
+ <script defer src="/vendor/htmx.min.js"></script>
2816
+ <script defer src="/mero.js"></script>
2817
+ <script defer src="/mero-forms.js"></script>
2818
+ ```
2819
+
2820
+ Template
2821
+
2822
+ ````html
2823
+
2824
+ <section class="mero-stack" id="export-run" aria-labelledby="export-run-title">
2825
+ <h2 class="mero-label" id="export-run-title">Nightly export</h2>
2826
+ <p class="mero-description" data-export-restarts>Not restarted yet</p>
2827
+ <span class="mero-row">
2828
+ <button class="mero-button mero-button-secondary" type="button" id="export-run-restart" hx-post="/demo/catalog/action-button?outcome=lost" hx-swap="none"
2829
+ data-mero-action data-mero-action-reread="#export-run">
2830
+ <span class="mero-button-label">Restart export</span><span class="mero-indicator mero-spinner" aria-hidden="true"></span></button>
2831
+ <span class="mero-action-status" data-mero-action-status role="status"></span>
2832
+ </span>
2833
+ </section>
2834
+ ````
2835
+
2719
2836
  # Button Group
2720
2837
 
2721
- Mero UI 0.7.0 · Buttons
2838
+ Mero UI 0.9.0 · Buttons
2722
2839
 
2723
2840
  Keep related actions together while preserving each button’s own label and focus.
2724
2841
 
@@ -2743,7 +2860,7 @@ Template
2743
2860
 
2744
2861
  # Close Button
2745
2862
 
2746
- Mero UI 0.7.0 · Buttons
2863
+ Mero UI 0.9.0 · Buttons
2747
2864
 
2748
2865
  Give a dialog an icon-only close action with an accessible name.
2749
2866
 
@@ -2775,7 +2892,7 @@ Template
2775
2892
 
2776
2893
  # Toggle Button
2777
2894
 
2778
- Mero UI 0.7.0 · Buttons
2895
+ Mero UI 0.9.0 · Buttons
2779
2896
 
2780
2897
  Represent a persistent on or off state with a pressed button.
2781
2898
 
@@ -2798,7 +2915,7 @@ Template
2798
2915
 
2799
2916
  # Toggle Button Group
2800
2917
 
2801
- Mero UI 0.7.0 · Buttons
2918
+ Mero UI 0.9.0 · Buttons
2802
2919
 
2803
2920
  Select one presentation mode from a connected set of controls.
2804
2921
 
@@ -2828,7 +2945,7 @@ Template
2828
2945
 
2829
2946
  # Checkbox
2830
2947
 
2831
- Mero UI 0.7.0 · Forms
2948
+ Mero UI 0.9.0 · Forms
2832
2949
 
2833
2950
  Include an independent binary choice in a form.
2834
2951
 
@@ -2852,7 +2969,7 @@ Template
2852
2969
 
2853
2970
  # Checkbox Group
2854
2971
 
2855
- Mero UI 0.7.0 · Forms
2972
+ Mero UI 0.9.0 · Forms
2856
2973
 
2857
2974
  Group related independent choices with a fieldset and legend.
2858
2975
 
@@ -2880,7 +2997,7 @@ Template
2880
2997
 
2881
2998
  # Description
2882
2999
 
2883
- Mero UI 0.7.0 · Forms
3000
+ Mero UI 0.9.0 · Forms
2884
3001
 
2885
3002
  Connect persistent help text to a control.
2886
3003
 
@@ -2907,7 +3024,7 @@ Template
2907
3024
 
2908
3025
  # Error Message
2909
3026
 
2910
- Mero UI 0.7.0 · Forms
3027
+ Mero UI 0.9.0 · Forms
2911
3028
 
2912
3029
  Present a form-level failure where the user can act on it.
2913
3030
 
@@ -2931,7 +3048,7 @@ Template
2931
3048
 
2932
3049
  # Field Error
2933
3050
 
2934
- Mero UI 0.7.0 · Forms
3051
+ Mero UI 0.9.0 · Forms
2935
3052
 
2936
3053
  Associate a validation error with the field that needs attention.
2937
3054
 
@@ -2960,7 +3077,7 @@ Template
2960
3077
 
2961
3078
  # Fieldset
2962
3079
 
2963
- Mero UI 0.7.0 · Forms
3080
+ Mero UI 0.9.0 · Forms
2964
3081
 
2965
3082
  Add a shared label to a related set of form controls.
2966
3083
 
@@ -2995,9 +3112,53 @@ Template
2995
3112
  </div>
2996
3113
  ````
2997
3114
 
3115
+ ## Conditional fields
3116
+
3117
+ Show fields for the chosen option and enable Apply only after a change.
3118
+
3119
+ data-mero-show-when names a field and the values that show the branch. A hidden branch is disabled, so its required fields neither block nor join the submission. Use a fieldset so its controls keep their own disabled state. data-mero-dirty keeps the submit buttons disabled until a field differs from the value the server rendered, and again after it is changed back. Render both states on the server so the form is right before scripts run.
3120
+
3121
+ Page assets
3122
+
3123
+ ```html
3124
+ <link rel="stylesheet" href="/mero.css">
3125
+ <script defer src="/vendor/htmx.min.js"></script>
3126
+ <script defer src="/mero.js"></script>
3127
+ <script defer src="/mero-forms.js"></script>
3128
+ ```
3129
+
3130
+ Template
3131
+
3132
+ ````html
3133
+ <div class="mero-scope" data-mero-scope>
3134
+ <form class="mero-stack" action="/demo/stock-summary" method="get" hx-get="/demo/stock-summary" hx-target="find output"
3135
+ data-mero-form data-mero-dirty>
3136
+ <fieldset class="mero-fieldset">
3137
+ <legend class="mero-label">Owner</legend>
3138
+ <div class="mero-radio-group">
3139
+ <label><input class="mero-radio" type="radio" name="owner" value="me" checked> Only me</label>
3140
+ <label><input class="mero-radio" type="radio" name="owner" value="team"> A team</label>
3141
+ <label><input class="mero-radio" type="radio" name="owner" value="org"> The organisation</label>
3142
+ </div>
3143
+ </fieldset>
3144
+ <fieldset class="mero-fieldset" data-mero-show-when="owner=team org" hidden disabled>
3145
+ <legend class="mero-label">Sharing</legend>
3146
+ <div class="mero-field">
3147
+ <label class="mero-label" for="branch-demo-team">Team name</label>
3148
+ <input class="mero-input" id="branch-demo-team" name="team" required>
3149
+ </div>
3150
+ </fieldset>
3151
+ <div class="mero-row">
3152
+ <button class="mero-button mero-button-primary" type="submit" disabled>Apply</button>
3153
+ <output class="mero-description mero-form-status" aria-live="polite"></output>
3154
+ </div>
3155
+ </form>
3156
+ </div>
3157
+ ````
3158
+
2998
3159
  # Form
2999
3160
 
3000
- Mero UI 0.7.0 · Forms
3161
+ Mero UI 0.9.0 · Forms
3001
3162
 
3002
3163
  Submit native fields to the server and render an HTML response in place.
3003
3164
 
@@ -3029,9 +3190,163 @@ Template
3029
3190
  </div>
3030
3191
  ````
3031
3192
 
3193
+ ## One-time credential
3194
+
3195
+ Create an API token and keep the page until the person has copied it.
3196
+
3197
+ While the request runs, and while the token is shown, Mero cancels boosted navigation and requests that would replace the token, undoes Back and asks before the page unloads. The token is cleared on I copied it, when a surrounding dialog closes and when the page is hidden. Render the secret only in this response, never in a page the server can send again.
3198
+
3199
+ Page assets
3200
+
3201
+ ```html
3202
+ <link rel="stylesheet" href="/mero.css">
3203
+ <script defer src="/vendor/htmx.min.js"></script>
3204
+ <script defer src="/mero.js"></script>
3205
+ <script defer src="/mero-forms.js"></script>
3206
+ ```
3207
+
3208
+ Template
3209
+
3210
+ ````html
3211
+ <div class="mero-scope" data-mero-scope>
3212
+ <div class="mero-stack">
3213
+ <form class="mero-stack" method="post" action="/demo/catalog/form-credential" hx-post="/demo/catalog/form-credential"
3214
+ hx-target="#api-token-secret" data-mero-form data-mero-hold="Wait for the new token. Leaving now would lose it.">
3215
+ <div class="mero-field">
3216
+ <label class="mero-label" for="api-token-name">Token name</label>
3217
+ <input class="mero-input" id="api-token-name" name="name" required maxlength="40" value="Deploy bot">
3218
+ </div>
3219
+ <p class="mero-field-error" data-mero-form-error role="alert" hidden></p>
3220
+ <div class="mero-row">
3221
+ <button class="mero-button mero-button-primary" type="submit" id="api-token-create">
3222
+ <span class="mero-button-label">Create token</span>
3223
+ <span class="mero-indicator mero-spinner" aria-hidden="true"></span>
3224
+ </button>
3225
+ </div>
3226
+ </form>
3227
+ <div class="mero-stack" id="api-token-secret" data-mero-ephemeral
3228
+ data-mero-hold="Copy the token before you leave. It is shown only once."></div>
3229
+ </div>
3230
+ </div>
3231
+ ````
3232
+
3233
+ ## Action outcome
3234
+
3235
+ Rotate a key and report whether it succeeded, was refused or has an unknown result.
3236
+
3237
+ The submit button gets data-mero-action-state. A 2xx response must contain data-mero-action-expect, otherwise the outcome is unknown and nothing is swapped. An unknown outcome reveals the data-mero-action-unknown panel and never closes the dialog or shows success, including a request aborted after it was sent. data-mero-clear-passwords empties password fields after every response. A retry resubmits the same form, so keep the idempotency key in the markup.
3238
+
3239
+ Page assets
3240
+
3241
+ ```html
3242
+ <link rel="stylesheet" href="/mero.css">
3243
+ <script defer src="/vendor/htmx.min.js"></script>
3244
+ <script defer src="/mero.js"></script>
3245
+ <script defer src="/mero-forms.js"></script>
3246
+ ```
3247
+
3248
+ Template
3249
+
3250
+ ````html
3251
+ <div class="mero-scope" data-mero-scope>
3252
+ <form class="mero-stack" method="post" action="/demo/catalog/form-outcome" hx-post="/demo/catalog/form-outcome"
3253
+ hx-target="#rotate-key-result" hx-headers='{"Idempotency-Key":"rotate-demo-7f3a"}'
3254
+ data-mero-form data-mero-clear-passwords data-mero-action-expect="[data-rotated-key]" data-mero-action-unknown="#rotate-key-unknown">
3255
+ <div class="mero-field">
3256
+ <label class="mero-label" for="rotate-key-outcome">Simulated server response</label>
3257
+ <select class="mero-select" id="rotate-key-outcome" name="outcome">
3258
+ <option value="succeeded">Key rotated</option>
3259
+ <option value="rejected">Refused: wrong password</option>
3260
+ <option value="unknown">Gateway timeout</option>
3261
+ <option value="incomplete">200 without the new key</option>
3262
+ </select>
3263
+ </div>
3264
+ <div class="mero-field">
3265
+ <label class="mero-label" for="rotate-key-password">Your password</label>
3266
+ <input class="mero-input" id="rotate-key-password" name="password" type="password" autocomplete="current-password" required>
3267
+ </div>
3268
+ <p class="mero-field-error" data-mero-form-error role="alert" hidden></p>
3269
+ <div id="rotate-key-unknown" hidden>
3270
+ <div class="mero-alert mero-alert-warning">
3271
+ <strong class="mero-alert-title">The key may have rotated</strong>
3272
+ <p>Check the key list before you try again. A retry sends the same request ID, so the server will not rotate twice.</p>
3273
+ </div>
3274
+ </div>
3275
+ <div class="mero-row">
3276
+ <button class="mero-button mero-button-primary" type="submit">
3277
+ <span class="mero-button-label">Rotate signing key</span>
3278
+ <span class="mero-indicator mero-spinner" aria-hidden="true"></span>
3279
+ </button>
3280
+ </div>
3281
+ <div class="mero-form-status" id="rotate-key-result" role="status"></div>
3282
+ </form>
3283
+ </div>
3284
+ ````
3285
+
3286
+ ## Two columns
3287
+
3288
+ Arrange a longer form in two columns that stack on small screens.
3289
+
3290
+ Put fields in a mero-form-grid. Fields fill two columns in source order, which is also the tab order, and add mero-field-wide to a field that needs the whole row, such as a text area. The grid stacks below 768 px and in containers too narrow for two fields, such as a dialog. Use a fieldset with a legend to name each group of fields.
3291
+
3292
+ Page assets
3293
+
3294
+ ```html
3295
+ <link rel="stylesheet" href="/mero.css">
3296
+ <script defer src="/vendor/htmx.min.js"></script>
3297
+ <script defer src="/mero.js"></script>
3298
+ ```
3299
+
3300
+ Template
3301
+
3302
+ ````html
3303
+ <div class="mero-scope" data-mero-scope>
3304
+ <form class="mero-form" action="/demo/catalog/form" method="get" style="inline-size:min(100%,40rem)"
3305
+ hx-get="/demo/catalog/form" hx-target="#catalog-form-grid-result" hx-swap="innerHTML">
3306
+ <fieldset class="mero-fieldset">
3307
+ <legend class="mero-label">Profile</legend>
3308
+ <div class="mero-form-grid">
3309
+ <div class="mero-field">
3310
+ <label class="mero-label" for="demo-grid-name">Name</label>
3311
+ <input class="mero-input" id="demo-grid-name" name="name" autocomplete="given-name" required maxlength="80" placeholder="Taylor">
3312
+ </div>
3313
+ <div class="mero-field">
3314
+ <label class="mero-label" for="demo-grid-email">Email</label>
3315
+ <input class="mero-input" id="demo-grid-email" name="email" type="email" autocomplete="email" aria-describedby="demo-grid-email-hint">
3316
+ <p class="mero-description" id="demo-grid-email-hint">Used for release notifications.</p>
3317
+ </div>
3318
+ <div class="mero-field">
3319
+ <label class="mero-label" for="demo-grid-team">Team</label>
3320
+ <select class="mero-select" id="demo-grid-team" name="team">
3321
+ <option>Platform</option>
3322
+ <option>Design</option>
3323
+ <option>Support</option>
3324
+ </select>
3325
+ </div>
3326
+ <div class="mero-field">
3327
+ <label class="mero-label" for="demo-grid-region">Region</label>
3328
+ <select class="mero-select" id="demo-grid-region" name="region">
3329
+ <option>Europe West</option>
3330
+ <option>US East</option>
3331
+ </select>
3332
+ </div>
3333
+ <div class="mero-field mero-field-wide">
3334
+ <label class="mero-label" for="demo-grid-notes">Notes</label>
3335
+ <textarea class="mero-textarea" id="demo-grid-notes" name="notes" rows="3"></textarea>
3336
+ </div>
3337
+ </div>
3338
+ </fieldset>
3339
+ <div class="mero-row">
3340
+ <button class="mero-button mero-button-primary" type="submit">Save profile</button>
3341
+ </div>
3342
+ <div class="mero-form-status" id="catalog-form-grid-result" role="status"></div>
3343
+ </form>
3344
+ </div>
3345
+ ````
3346
+
3032
3347
  # Input
3033
3348
 
3034
- Mero UI 0.7.0 · Forms
3349
+ Mero UI 0.9.0 · Forms
3035
3350
 
3036
3351
  A styled native input with browser validation and autocomplete.
3037
3352
 
@@ -3058,7 +3373,7 @@ Template
3058
3373
 
3059
3374
  # Input Group
3060
3375
 
3061
- Mero UI 0.7.0 · Forms
3376
+ Mero UI 0.9.0 · Forms
3062
3377
 
3063
3378
  Combine a control and contextual prefix with a single outline.
3064
3379
 
@@ -3087,7 +3402,7 @@ Template
3087
3402
 
3088
3403
  # Input OTP
3089
3404
 
3090
- Mero UI 0.7.0 · Forms
3405
+ Mero UI 0.9.0 · Forms
3091
3406
 
3092
3407
  Collect a six-digit code in one input with mobile autofill.
3093
3408
 
@@ -3116,7 +3431,7 @@ Template
3116
3431
 
3117
3432
  # Label
3118
3433
 
3119
- Mero UI 0.7.0 · Forms
3434
+ Mero UI 0.9.0 · Forms
3120
3435
 
3121
3436
  Name an input and expand its activation area.
3122
3437
 
@@ -3143,7 +3458,7 @@ Template
3143
3458
 
3144
3459
  # Number Field
3145
3460
 
3146
- Mero UI 0.7.0 · Forms
3461
+ Mero UI 0.9.0 · Forms
3147
3462
 
3148
3463
  Set numeric bounds and increments for a native field.
3149
3464
 
@@ -3170,7 +3485,7 @@ Template
3170
3485
 
3171
3486
  # Radio Group
3172
3487
 
3173
- Mero UI 0.7.0 · Forms
3488
+ Mero UI 0.9.0 · Forms
3174
3489
 
3175
3490
  Choose exactly one option from a labeled set.
3176
3491
 
@@ -3198,7 +3513,7 @@ Template
3198
3513
 
3199
3514
  # Search Field
3200
3515
 
3201
- Mero UI 0.7.0 · Forms
3516
+ Mero UI 0.9.0 · Forms
3202
3517
 
3203
3518
  Use a native search field with the platform’s clear affordance.
3204
3519
 
@@ -3223,9 +3538,51 @@ Template
3223
3538
  </div>
3224
3539
  ````
3225
3540
 
3541
+ ## Filtered list
3542
+
3543
+ Filter a list as you type without losing it when the server fails.
3544
+
3545
+ Choose Archived to see a failed read: the list keeps its previous results, the error explains why and the status select returns to the filter the list shows. Mero also skips a 2xx response without the hx-select region, and loads a redirected response without it as a full page, such as a login page after the session expired.
3546
+
3547
+ Page assets
3548
+
3549
+ ```html
3550
+ <link rel="stylesheet" href="/mero.css">
3551
+ <script defer src="/vendor/htmx.min.js"></script>
3552
+ <script defer src="/mero.js"></script>
3553
+ <script defer src="/mero-forms.js"></script>
3554
+ ```
3555
+
3556
+ Template
3557
+
3558
+ ````html
3559
+ <div class="mero-scope" data-mero-scope>
3560
+ <form class="mero-stack" role="search" action="/demo/catalog/search-results" method="get" data-mero-search
3561
+ hx-get="/demo/catalog/search-results" hx-trigger="input delay:250ms, submit" hx-sync="this:replace"
3562
+ hx-target="#search-demo-results" hx-select="#search-demo-results" hx-swap="outerHTML">
3563
+ <div class="mero-field">
3564
+ <label class="mero-label" for="search-demo-q">Search projects</label>
3565
+ <input class="mero-input" id="search-demo-q" type="search" name="q" autocomplete="off">
3566
+
3567
+ </div>
3568
+ <div class="mero-field">
3569
+ <label class="mero-label" for="search-demo-status">Status</label>
3570
+ <select class="mero-select" id="search-demo-status" name="status">
3571
+ <option value="" selected>Any status</option>
3572
+ <option value="active">Active</option>
3573
+ <option value="paused">Paused</option>
3574
+ <option value="archived">Archived (simulated server error)</option>
3575
+ </select>
3576
+ </div>
3577
+ <p class="mero-field-error" data-mero-search-error role="alert" hidden></p>
3578
+ </form>
3579
+ <ul class="mero-stack" id="search-demo-results" aria-label="Projects"><li>Atlas <span class="mero-badge">active</span></li><li>Beacon <span class="mero-badge">paused</span></li><li>Cobalt <span class="mero-badge">active</span></li><li>Delta <span class="mero-badge">archived</span></li><li>Ember <span class="mero-badge">active</span></li></ul>
3580
+ </div>
3581
+ ````
3582
+
3226
3583
  # Text Area
3227
3584
 
3228
- Mero UI 0.7.0 · Forms
3585
+ Mero UI 0.9.0 · Forms
3229
3586
 
3230
3587
  Let users edit multiple lines of text with an optional autosizing surface.
3231
3588
 
@@ -3251,7 +3608,7 @@ Template
3251
3608
 
3252
3609
  # Text Field
3253
3610
 
3254
- Mero UI 0.7.0 · Forms
3611
+ Mero UI 0.9.0 · Forms
3255
3612
 
3256
3613
  Compose a label, input, and hint into a reusable form field.
3257
3614
 
@@ -3278,7 +3635,7 @@ Template
3278
3635
 
3279
3636
  # Calendar
3280
3637
 
3281
- Mero UI 0.7.0 · Date and time
3638
+ Mero UI 0.9.0 · Date and time
3282
3639
 
3283
3640
  Navigate months and choose a day on an inline calendar rendered by the server.
3284
3641
 
@@ -3357,9 +3714,9 @@ Template
3357
3714
  id="calendar-day-22" aria-label="Sunday, November 22, 2026" aria-pressed="false"
3358
3715
  hx-get="/demo/catalog/calendar?month=2026-11&amp;selected=2026-11-22" hx-target="closest .mero-calendar" hx-swap="outerHTML">22</button></td></tr>
3359
3716
  <tr><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
3360
- id="calendar-day-23" aria-label="Monday, November 23, 2026" aria-pressed="false" aria-current="date"
3717
+ id="calendar-day-23" aria-label="Monday, November 23, 2026" aria-pressed="false"
3361
3718
  hx-get="/demo/catalog/calendar?month=2026-11&amp;selected=2026-11-23" hx-target="closest .mero-calendar" hx-swap="outerHTML">23</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
3362
- id="calendar-day-24" aria-label="Tuesday, November 24, 2026" aria-pressed="false"
3719
+ id="calendar-day-24" aria-label="Tuesday, November 24, 2026" aria-pressed="false" aria-current="date"
3363
3720
  hx-get="/demo/catalog/calendar?month=2026-11&amp;selected=2026-11-24" hx-target="closest .mero-calendar" hx-swap="outerHTML">24</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
3364
3721
  id="calendar-day-25" aria-label="Wednesday, November 25, 2026" aria-pressed="false"
3365
3722
  hx-get="/demo/catalog/calendar?month=2026-11&amp;selected=2026-11-25" hx-target="closest .mero-calendar" hx-swap="outerHTML">25</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
@@ -3382,7 +3739,7 @@ Template
3382
3739
 
3383
3740
  # Date Field
3384
3741
 
3385
- Mero UI 0.7.0 · Date and time
3742
+ Mero UI 0.9.0 · Date and time
3386
3743
 
3387
3744
  Enter a calendar date in the system’s preferred format.
3388
3745
 
@@ -3409,7 +3766,7 @@ Template
3409
3766
 
3410
3767
  # Date Picker
3411
3768
 
3412
- Mero UI 0.7.0 · Date and time
3769
+ Mero UI 0.9.0 · Date and time
3413
3770
 
3414
3771
  Choose a date with the browser’s calendar picker and native constraints.
3415
3772
 
@@ -3438,7 +3795,7 @@ Template
3438
3795
 
3439
3796
  # Date Range Picker
3440
3797
 
3441
- Mero UI 0.7.0 · Date and time
3798
+ Mero UI 0.9.0 · Date and time
3442
3799
 
3443
3800
  Collect the start and end dates of a range.
3444
3801
 
@@ -3477,7 +3834,7 @@ Template
3477
3834
 
3478
3835
  # Range Calendar
3479
3836
 
3480
- Mero UI 0.7.0 · Date and time
3837
+ Mero UI 0.9.0 · Date and time
3481
3838
 
3482
3839
  Build a range with two native calendar controls.
3483
3840
 
@@ -3516,7 +3873,7 @@ Template
3516
3873
 
3517
3874
  # Time Field
3518
3875
 
3519
- Mero UI 0.7.0 · Date and time
3876
+ Mero UI 0.9.0 · Date and time
3520
3877
 
3521
3878
  Choose a wall-clock time without a timezone conversion.
3522
3879
 
@@ -3545,7 +3902,7 @@ Template
3545
3902
 
3546
3903
  # Accordion
3547
3904
 
3548
- Mero UI 0.7.0 · Navigation
3905
+ Mero UI 0.9.0 · Navigation
3549
3906
 
3550
3907
  Disclose one section at a time using grouped native details.
3551
3908
 
@@ -3575,7 +3932,7 @@ Template
3575
3932
 
3576
3933
  # Breadcrumbs
3577
3934
 
3578
- Mero UI 0.7.0 · Navigation
3935
+ Mero UI 0.9.0 · Navigation
3579
3936
 
3580
3937
  Show the user’s current location and its parent pages.
3581
3938
 
@@ -3602,7 +3959,7 @@ Template
3602
3959
 
3603
3960
  # Disclosure
3604
3961
 
3605
- Mero UI 0.7.0 · Navigation
3962
+ Mero UI 0.9.0 · Navigation
3606
3963
 
3607
3964
  Reveal a single block of supplementary information.
3608
3965
 
@@ -3626,7 +3983,7 @@ Template
3626
3983
 
3627
3984
  # Disclosure Group
3628
3985
 
3629
- Mero UI 0.7.0 · Navigation
3986
+ Mero UI 0.9.0 · Navigation
3630
3987
 
3631
3988
  Present a collection of independently expandable sections.
3632
3989
 
@@ -3656,7 +4013,7 @@ Template
3656
4013
 
3657
4014
  # Link
3658
4015
 
3659
- Mero UI 0.7.0 · Navigation
4016
+ Mero UI 0.9.0 · Navigation
3660
4017
 
3661
4018
  Navigate to a real URL with native link semantics.
3662
4019
 
@@ -3677,7 +4034,7 @@ Template
3677
4034
 
3678
4035
  # Pagination
3679
4036
 
3680
- Mero UI 0.7.0 · Navigation
4037
+ Mero UI 0.9.0 · Navigation
3681
4038
 
3682
4039
  Navigate between result pages with server-rendered fragments.
3683
4040
 
@@ -3716,7 +4073,7 @@ Template
3716
4073
 
3717
4074
  # Tabs
3718
4075
 
3719
- Mero UI 0.7.0 · Navigation
4076
+ Mero UI 0.9.0 · Navigation
3720
4077
 
3721
4078
  Switch between labeled panels with mouse or arrow keys.
3722
4079
 
@@ -3778,9 +4135,32 @@ Template
3778
4135
  </div>
3779
4136
  ````
3780
4137
 
4138
+ ## Link tabs
4139
+
4140
+ Switch between views of one page that the URL keeps.
4141
+
4142
+ Use links in a nav when each tab is its own URL, such as a filtered view of a list. The server puts aria-current=page on the current link. Tab and Enter work as on any link, so there is no tablist role, no arrow-key handling and no script. Add a mero-tab-count after the label for an optional count; it is read with the label. The tabs wrap on narrow screens.
4143
+
4144
+ Page assets
4145
+
4146
+ ```html
4147
+ <link rel="stylesheet" href="/mero.css">
4148
+ <script defer src="/mero.js"></script>
4149
+ ```
4150
+
4151
+ Template
4152
+
4153
+ ````html
4154
+ <nav class="mero-tabs-list" aria-label="Operation views">
4155
+ <a class="mero-tab" href="?view=attention" aria-current="page">Needs attention <span class="mero-tab-count">3</span></a>
4156
+ <a class="mero-tab" href="?view=active">In progress <span class="mero-tab-count">12</span></a>
4157
+ <a class="mero-tab" href="?view=closed">Completed</a>
4158
+ </nav>
4159
+ ````
4160
+
3781
4161
  # Alert Dialog
3782
4162
 
3783
- Mero UI 0.7.0 · Overlays
4163
+ Mero UI 0.9.0 · Overlays
3784
4164
 
3785
4165
  Ask for confirmation on a decision that calls for attention.
3786
4166
 
@@ -3815,7 +4195,7 @@ Template
3815
4195
 
3816
4196
  # Typed Confirmation
3817
4197
 
3818
- Mero UI 0.7.0 · Overlays
4198
+ Mero UI 0.9.0 · Overlays
3819
4199
 
3820
4200
  Require an exact phrase before submitting a destructive action.
3821
4201
 
@@ -3974,12 +4354,14 @@ Template
3974
4354
 
3975
4355
  # Drawer
3976
4356
 
3977
- Mero UI 0.7.0 · Overlays
4357
+ Mero UI 0.9.0 · Overlays
3978
4358
 
3979
4359
  Open a full-height edge panel for work that benefits from more room.
3980
4360
 
3981
4361
  ## Default
3982
4362
 
4363
+ The drawer opens from the inline end. Add mero-drawer-start to open it from the start edge.
4364
+
3983
4365
  Page assets
3984
4366
 
3985
4367
  ```html
@@ -4005,9 +4387,89 @@ Template
4005
4387
  </div>
4006
4388
  ````
4007
4389
 
4390
+ ## Start edge
4391
+
4392
+ Open app navigation from the start edge on small screens.
4393
+
4394
+ Add mero-drawer-start to a mero-drawer. It slides in from the left, or from the right in RTL, and rounds its inline-end corners. Give it a visible close button so touch users don't have to find the backdrop; Escape and the backdrop also close it, and focus returns to the opener.
4395
+
4396
+ Page assets
4397
+
4398
+ ```html
4399
+ <link rel="stylesheet" href="/mero.css">
4400
+ <script defer src="/mero.js"></script>
4401
+ ```
4402
+
4403
+ Template
4404
+
4405
+ ````html
4406
+ <div class="mero-scope" data-mero-scope>
4407
+ <button class="mero-button mero-button-outline" type="button" data-mero-open="demo-nav-drawer">Menu</button>
4408
+ <dialog class="mero-dialog mero-drawer mero-drawer-start" id="demo-nav-drawer" aria-labelledby="demo-nav-drawer-title">
4409
+ <div class="mero-dialog-body">
4410
+ <div class="mero-dialog-header">
4411
+ <h2 class="mero-dialog-title" id="demo-nav-drawer-title">Navigation</h2>
4412
+ <button class="mero-button mero-close-button" type="button" aria-label="Close navigation" data-mero-close><span class="mero-dismiss-mark" aria-hidden="true"></span></button>
4413
+ </div>
4414
+ <nav aria-label="Main">
4415
+ <ul class="mero-stack">
4416
+ <li><a class="mero-link" href="/components" aria-current="page">Components</a></li>
4417
+ <li><a class="mero-link" href="/layouts">Layouts</a></li>
4418
+ <li><a class="mero-link" href="/start">Quick start</a></li>
4419
+ </ul>
4420
+ </nav>
4421
+ </div>
4422
+ </dialog>
4423
+ </div>
4424
+ ````
4425
+
4426
+ ## Boosted navigation
4427
+
4428
+ Navigate from a drawer with boosted links that swap only the page region.
4429
+
4430
+ data-mero-boost names the region every boosted page must contain. The newest boosted GET wins and older ones are aborted, never a boosted form that changes data. A response without the region, such as a login page, or a failed GET becomes a full page load. Open dialogs close, and focus moves to the new region unless the person moved it during the load. This demo keeps the URL; in your app, let boosted links push it.
4431
+
4432
+ Page assets
4433
+
4434
+ ```html
4435
+ <link rel="stylesheet" href="/mero.css">
4436
+ <script defer src="/vendor/htmx.min.js"></script>
4437
+ <script defer src="/mero.js"></script>
4438
+ ```
4439
+
4440
+ Template
4441
+
4442
+ ````html
4443
+ <div class="mero-scope" data-mero-scope>
4444
+ <div class="mero-stack" hx-boost:inherited="true" hx-select:inherited="#boost-demo-main" hx-target:inherited="#boost-demo-main"
4445
+ hx-swap:inherited="outerHTML" hx-push-url:inherited="false" data-mero-boost="#boost-demo-main">
4446
+ <button class="mero-button mero-button-outline" type="button" data-mero-open="boost-demo-drawer">Open navigation</button>
4447
+ <dialog class="mero-dialog mero-drawer" id="boost-demo-drawer" aria-labelledby="boost-demo-drawer-title">
4448
+ <div class="mero-dialog-body">
4449
+ <div class="mero-dialog-header">
4450
+ <h2 class="mero-dialog-title" id="boost-demo-drawer-title">Navigation</h2>
4451
+ <button class="mero-button mero-close-button" type="button" aria-label="Close navigation" data-mero-close><span class="mero-dismiss-mark" aria-hidden="true"></span></button>
4452
+ </div>
4453
+ <nav aria-label="Sections">
4454
+ <ul class="mero-stack">
4455
+ <li><a class="mero-link" href="/demo/catalog/boost-page?page=overview">Overview</a></li>
4456
+ <li><a class="mero-link" href="/demo/catalog/boost-page?page=reports">Reports</a></li>
4457
+ <li><a class="mero-link" href="/demo/catalog/boost-page?page=settings">Settings</a></li>
4458
+ </ul>
4459
+ </nav>
4460
+ </div>
4461
+ </dialog>
4462
+ <section class="mero-card" id="boost-demo-main" aria-labelledby="boost-demo-title">
4463
+ <h2 class="mero-card-title" id="boost-demo-title">Overview</h2>
4464
+ <p class="mero-description">Three deployments ran today. All of them succeeded.</p>
4465
+ </section>
4466
+ </div>
4467
+ </div>
4468
+ ````
4469
+
4008
4470
  # Modal
4009
4471
 
4010
- Mero UI 0.7.0 · Overlays
4472
+ Mero UI 0.9.0 · Overlays
4011
4473
 
4012
4474
  Open a centered, named dialog with native focus containment.
4013
4475
 
@@ -4040,7 +4502,7 @@ Template
4040
4502
 
4041
4503
  # Command Menu
4042
4504
 
4043
- Mero UI 0.7.0 · Overlays
4505
+ Mero UI 0.9.0 · Overlays
4044
4506
 
4045
4507
  Press Cmd or Ctrl K to search pages and actions returned by your server.
4046
4508
 
@@ -4085,7 +4547,7 @@ Template
4085
4547
 
4086
4548
  # Popover
4087
4549
 
4088
- Mero UI 0.7.0 · Overlays
4550
+ Mero UI 0.9.0 · Overlays
4089
4551
 
4090
4552
  Display contextual information using the browser’s top layer.
4091
4553
 
@@ -4114,7 +4576,7 @@ Template
4114
4576
 
4115
4577
  # Sheet
4116
4578
 
4117
- Mero UI 0.7.0 · Overlays
4579
+ Mero UI 0.9.0 · Overlays
4118
4580
 
4119
4581
  Present concise secondary content from the bottom edge.
4120
4582
 
@@ -4147,7 +4609,7 @@ Template
4147
4609
 
4148
4610
  # Toast
4149
4611
 
4150
- Mero UI 0.7.0 · Overlays
4612
+ Mero UI 0.9.0 · Overlays
4151
4613
 
4152
4614
  Announce a completed action without interrupting the current task.
4153
4615
 
@@ -4168,7 +4630,7 @@ Template
4168
4630
 
4169
4631
  # Tooltip
4170
4632
 
4171
- Mero UI 0.7.0 · Overlays
4633
+ Mero UI 0.9.0 · Overlays
4172
4634
 
4173
4635
  Show a brief hint on pointer hover or keyboard focus.
4174
4636
 
@@ -4194,7 +4656,7 @@ Template
4194
4656
 
4195
4657
  # Dropdown
4196
4658
 
4197
- Mero UI 0.7.0 · Collections
4659
+ Mero UI 0.9.0 · Collections
4198
4660
 
4199
4661
  Open a compact list of actions or destinations.
4200
4662
 
@@ -4224,7 +4686,7 @@ Template
4224
4686
 
4225
4687
  # Menu Button
4226
4688
 
4227
- Mero UI 0.7.0 · Collections
4689
+ Mero UI 0.9.0 · Collections
4228
4690
 
4229
4691
  Open row actions and move through them with the arrow keys.
4230
4692
 
@@ -4299,9 +4761,43 @@ Template
4299
4761
  </div>
4300
4762
  ````
4301
4763
 
4764
+ ## Groups and danger
4765
+
4766
+ Label groups of actions with a visible heading and set a destructive action apart.
4767
+
4768
+ Give each group role=group and aria-labelledby its mero-menu-heading. The heading is aria-hidden, so screen readers announce it once as the group name, and arrow keys and typeahead skip it. Use mero-menu-item-danger for an action that destroys data, after a separator, and name the action in its text because forced-colors mode drops the colour. Let it open a confirmation instead of acting immediately.
4769
+
4770
+ Page assets
4771
+
4772
+ ```html
4773
+ <link rel="stylesheet" href="/mero.css">
4774
+ <script defer src="/mero.js"></script>
4775
+ ```
4776
+
4777
+ Template
4778
+
4779
+ ````html
4780
+ <div class="mero-scope" data-mero-scope>
4781
+ <button class="mero-button mero-button-outline mero-button-sm" type="button" popovertarget="environment-menu" aria-haspopup="menu" aria-controls="environment-menu" aria-expanded="false">Environment actions</button>
4782
+ <div class="mero-popover mero-menu" id="environment-menu" popover role="menu" aria-label="acme-production actions">
4783
+ <div role="group" aria-labelledby="environment-menu-lifecycle">
4784
+ <div class="mero-menu-heading" id="environment-menu-lifecycle" aria-hidden="true">Lifecycle</div>
4785
+ <button class="mero-menu-item" role="menuitem" type="button" data-mero-toast="Deploy started">Deploy release</button>
4786
+ <button class="mero-menu-item" role="menuitem" type="button" data-mero-toast="Suspend requested">Suspend</button>
4787
+ </div>
4788
+ <div role="group" aria-labelledby="environment-menu-access">
4789
+ <div class="mero-menu-heading" id="environment-menu-access" aria-hidden="true">Access</div>
4790
+ <a class="mero-menu-item" role="menuitem" href="/components/typed-confirmation">Grant support access</a>
4791
+ </div>
4792
+ <hr class="mero-separator">
4793
+ <a class="mero-menu-item mero-menu-item-danger" role="menuitem" href="/components/typed-confirmation">Delete environment…</a>
4794
+ </div>
4795
+ </div>
4796
+ ````
4797
+
4302
4798
  # List Box
4303
4799
 
4304
- Mero UI 0.7.0 · Collections
4800
+ Mero UI 0.9.0 · Collections
4305
4801
 
4306
4802
  Present a selectable collection with arrow-key navigation.
4307
4803
 
@@ -4330,7 +4826,7 @@ Template
4330
4826
 
4331
4827
  # Tag Group
4332
4828
 
4333
- Mero UI 0.7.0 · Collections
4829
+ Mero UI 0.9.0 · Collections
4334
4830
 
4335
4831
  Display a small, labeled collection of metadata tags.
4336
4832
 
@@ -4355,7 +4851,7 @@ Template
4355
4851
 
4356
4852
  # Slider
4357
4853
 
4358
- Mero UI 0.7.0 · Controls
4854
+ Mero UI 0.9.0 · Controls
4359
4855
 
4360
4856
  Choose a value from a bounded range.
4361
4857
 
@@ -4381,7 +4877,7 @@ Template
4381
4877
 
4382
4878
  # Switch
4383
4879
 
4384
- Mero UI 0.7.0 · Controls
4880
+ Mero UI 0.9.0 · Controls
4385
4881
 
4386
4882
  Toggle one setting with a checkbox-backed switch.
4387
4883
 
@@ -4455,7 +4951,7 @@ Template
4455
4951
 
4456
4952
  # Alert
4457
4953
 
4458
- Mero UI 0.7.0 · Feedback
4954
+ Mero UI 0.9.0 · Feedback
4459
4955
 
4460
4956
  Place status or guidance alongside the content it describes.
4461
4957
 
@@ -4477,9 +4973,64 @@ Template
4477
4973
  </div>
4478
4974
  ````
4479
4975
 
4976
+ # Empty State
4977
+
4978
+ Mero UI 0.9.0 · Feedback
4979
+
4980
+ Explain an empty result and give the user a relevant next action.
4981
+
4982
+ ## Default
4983
+
4984
+ Use a heading at the level the page needs, so the empty result appears in the heading outline. Inside a table cell or a list, where a heading would break the outline, use strong instead. Put one action after the description, or several in a mero-row. The glyph is decorative and hidden from screen readers.
4985
+
4986
+ Page assets
4987
+
4988
+ ```html
4989
+ <link rel="stylesheet" href="/mero.css">
4990
+ <script defer src="/mero.js"></script>
4991
+ ```
4992
+
4993
+ Template
4994
+
4995
+ ````html
4996
+ <div class="mero-scope" data-mero-scope>
4997
+ <section class="mero-empty-state" aria-labelledby="empty-environments-title">
4998
+ <span class="mero-empty-glyph" aria-hidden="true"></span>
4999
+ <h2 id="empty-environments-title">No environments yet</h2>
5000
+ <p>Create the first environment to deploy a release to it.</p>
5001
+ <a class="mero-button mero-button-primary mero-button-sm" href="/components/form">New environment</a>
5002
+ </section>
5003
+ </div>
5004
+ ````
5005
+
5006
+ ## No matches
5007
+
5008
+ Explain why a filtered list is empty and how to widen it.
5009
+
5010
+ Use a heading at the level the page needs, so the empty result appears in the heading outline. Inside a table cell or a list, where a heading would break the outline, use strong instead. Put one action after the description, or several in a mero-row. The glyph is decorative and hidden from screen readers.
5011
+
5012
+ Page assets
5013
+
5014
+ ```html
5015
+ <link rel="stylesheet" href="/mero.css">
5016
+ <script defer src="/mero.js"></script>
5017
+ ```
5018
+
5019
+ Template
5020
+
5021
+ ````html
5022
+ <div class="mero-empty-state">
5023
+ <strong>No operations match these filters</strong>
5024
+ <p>Remove a filter or search for another environment.</p>
5025
+ <div class="mero-row">
5026
+ <a class="mero-button mero-button-outline mero-button-sm" href="/components/filter-chips">Clear filters</a>
5027
+ </div>
5028
+ </div>
5029
+ ````
5030
+
4480
5031
  # Meter
4481
5032
 
4482
- Mero UI 0.7.0 · Feedback
5033
+ Mero UI 0.9.0 · Feedback
4483
5034
 
4484
5035
  Show a measurement between known bounds.
4485
5036
 
@@ -4506,7 +5057,7 @@ Template
4506
5057
 
4507
5058
  # Live Progress
4508
5059
 
4509
- Mero UI 0.7.0 · Feedback
5060
+ Mero UI 0.9.0 · Feedback
4510
5061
 
4511
5062
  Follow a deployment through to its final status.
4512
5063
 
@@ -4541,9 +5092,42 @@ Template
4541
5092
  </div>
4542
5093
  ````
4543
5094
 
5095
+ ## Stale status
5096
+
5097
+ Keep showing the last confirmed status, with its time, while reads fail.
5098
+
5099
+ This demo endpoint fails every read after the first. data-mero-live-error fills {time} with the time of the last good read, in the browser's locale. data-mero-live-follow hands an error response with HX-Redirect, HX-Location or HX-Refresh to htmx and stops polling, so an expired session answered with 401 and HX-Redirect: /login goes to the login page instead of retrying forever.
5100
+
5101
+ Page assets
5102
+
5103
+ ```html
5104
+ <link rel="stylesheet" href="/mero.css">
5105
+ <script defer src="/vendor/htmx.min.js"></script>
5106
+ <script defer src="/mero.js"></script>
5107
+ <script defer src="/mero-live.js"></script>
5108
+ ```
5109
+
5110
+ Template
5111
+
5112
+ ````html
5113
+ <div class="mero-scope" data-mero-scope>
5114
+ <section class="mero-card mero-live" aria-labelledby="stale-deployment-title" tabindex="-1" data-mero-live="3000" data-mero-live-follow
5115
+ hx-get="/demo/catalog/live-progress?outage=1" hx-trigger="mero:refresh"
5116
+ hx-target="find [data-mero-live-status]" hx-swap="innerHTML" hx-include="find input">
5117
+ <h2 class="mero-card-title" id="stale-deployment-title">Production deployment</h2>
5118
+ <div class="mero-live-status" data-mero-live-status role="status" aria-atomic="true">
5119
+ <span class="mero-badge mero-badge-dot">Queued</span>
5120
+ <input type="hidden" name="started" value="">
5121
+ </div>
5122
+ <p class="mero-form-status" role="status" data-mero-live-error="Couldn't refresh. This is the status from {time}. Retrying…"></p>
5123
+ <button type="button" class="mero-button mero-button-secondary" data-mero-live-retry hidden>Retry now</button>
5124
+ </section>
5125
+ </div>
5126
+ ````
5127
+
4544
5128
  # Progress Bar
4545
5129
 
4546
- Mero UI 0.7.0 · Feedback
5130
+ Mero UI 0.9.0 · Feedback
4547
5131
 
4548
5132
  Report measurable progress toward completion.
4549
5133
 
@@ -4569,7 +5153,7 @@ Template
4569
5153
 
4570
5154
  # Progress Circle
4571
5155
 
4572
- Mero UI 0.7.0 · Feedback
5156
+ Mero UI 0.9.0 · Feedback
4573
5157
 
4574
5158
  Show a completion value in a compact circular display.
4575
5159
 
@@ -4591,7 +5175,7 @@ Template
4591
5175
 
4592
5176
  # Skeleton
4593
5177
 
4594
- Mero UI 0.7.0 · Feedback
5178
+ Mero UI 0.9.0 · Feedback
4595
5179
 
4596
5180
  Reserve space for content while its HTML is loading.
4597
5181
 
@@ -4616,7 +5200,7 @@ Template
4616
5200
 
4617
5201
  # Spinner
4618
5202
 
4619
- Mero UI 0.7.0 · Feedback
5203
+ Mero UI 0.9.0 · Feedback
4620
5204
 
4621
5205
  Indicate that work is underway when the completion time is unknown.
4622
5206
 
@@ -4640,12 +5224,14 @@ Template
4640
5224
 
4641
5225
  # Card
4642
5226
 
4643
- Mero UI 0.7.0 · Layout
5227
+ Mero UI 0.9.0 · Layout
4644
5228
 
4645
5229
  Group related content and an action into one compact surface.
4646
5230
 
4647
5231
  ## Default
4648
5232
 
5233
+ Put a title and optional description in mero-card-header. Use a section with aria-labelledby on the title when the card is a page region.
5234
+
4649
5235
  Page assets
4650
5236
 
4651
5237
  ```html
@@ -4663,9 +5249,130 @@ Template
4663
5249
  </article>
4664
5250
  ````
4665
5251
 
5252
+ ## Header actions and table
5253
+
5254
+ Give a card actions at the end of its header and let a table reach its edges.
5255
+
5256
+ Put actions in mero-card-actions as the header's last child; they stay at the inline end and wrap under the title on narrow cards. Wrap a table in mero-card-flush so its rows and borders run to the card's edges while the first and last cells keep the card's padding. Below 768 px, a mero-table-cards table inside the flush body returns to the card padding and shows labelled cards. If you change the card padding, set --mero-panel-padding instead so the flush body follows.
5257
+
5258
+ Page assets
5259
+
5260
+ ```html
5261
+ <link rel="stylesheet" href="/mero.css">
5262
+ <script defer src="/mero.js"></script>
5263
+ ```
5264
+
5265
+ Template
5266
+
5267
+ ````html
5268
+ <div class="mero-scope" data-mero-scope>
5269
+ <section class="mero-card" aria-labelledby="card-releases-title">
5270
+ <header class="mero-card-header">
5271
+ <h2 class="mero-card-title" id="card-releases-title">Recent releases</h2>
5272
+ <div class="mero-card-actions">
5273
+ <a class="mero-button mero-button-ghost mero-button-sm" href="/components/sortable-table">View all</a>
5274
+ <button class="mero-button mero-button-outline mero-button-sm" type="button" data-mero-toast="Release draft created">New release</button>
5275
+ </div>
5276
+ </header>
5277
+ <div class="mero-card-flush">
5278
+ <div class="mero-table-wrap mero-table-cards">
5279
+ <table class="mero-table" role="table" aria-labelledby="card-releases-title">
5280
+ <thead role="rowgroup"><tr role="row"><th role="columnheader" scope="col">Version</th><th role="columnheader" scope="col">Environment</th><th role="columnheader" scope="col">Status</th></tr></thead>
5281
+ <tbody role="rowgroup">
5282
+ <tr role="row">
5283
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Version</span><a class="mero-link" href="/components/sortable-table">v1.4.0</a></th>
5284
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Environment</span>Staging</td>
5285
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-warning">Review</span></td>
5286
+ </tr>
5287
+ <tr role="row">
5288
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Version</span><a class="mero-link" href="/components/sortable-table">v1.3.0</a></th>
5289
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Environment</span>Production</td>
5290
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-success">Live</span></td>
5291
+ </tr>
5292
+ <tr role="row">
5293
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Version</span><a class="mero-link" href="/components/sortable-table">v1.2.2</a></th>
5294
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Environment</span>Production</td>
5295
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge">Retired</span></td>
5296
+ </tr>
5297
+ </tbody>
5298
+ </table>
5299
+ </div>
5300
+ </div>
5301
+ </section>
5302
+ </div>
5303
+ ````
5304
+
5305
+ # Page Header
5306
+
5307
+ Mero UI 0.9.0 · Layout
5308
+
5309
+ Open a page with its title, a short description and the page’s main actions.
5310
+
5311
+ ## Default
5312
+
5313
+ Use one per page, with the page’s h1. The description is a p inside the heading block. Actions sit at the end of the first row and wrap under the heading below 768 px. The layouts module uses the same class for its app pages.
5314
+
5315
+ Page assets
5316
+
5317
+ ```html
5318
+ <link rel="stylesheet" href="/mero.css">
5319
+ <script defer src="/mero.js"></script>
5320
+ ```
5321
+
5322
+ Template
5323
+
5324
+ ````html
5325
+ <header class="mero-page-head">
5326
+ <div>
5327
+ <h1>Environments</h1>
5328
+ <p>Every customer environment and the release it runs.</p>
5329
+ </div>
5330
+ <div class="mero-page-head-actions">
5331
+ <a class="mero-button mero-button-primary" href="/components/form">New environment</a>
5332
+ </div>
5333
+ </header>
5334
+ ````
5335
+
5336
+ ## Record
5337
+
5338
+ Show where a record sits, its current status and what you can do with it.
5339
+
5340
+ Put Breadcrumbs first; they take the whole first row. Wrap the h1 and its status badge in mero-page-head-title so the badge follows the title and wraps with it. Keep the badge outside the h1 so the heading’s name stays the record’s name. The meta line is the p after the title row.
5341
+
5342
+ Page assets
5343
+
5344
+ ```html
5345
+ <link rel="stylesheet" href="/mero.css">
5346
+ <script defer src="/mero.js"></script>
5347
+ ```
5348
+
5349
+ Template
5350
+
5351
+ ````html
5352
+ <header class="mero-page-head">
5353
+ <nav class="mero-breadcrumbs" aria-label="Breadcrumb">
5354
+ <ol>
5355
+ <li><a href="/components">Environments</a></li>
5356
+ <li aria-current="page">acme-production</li>
5357
+ </ol>
5358
+ </nav>
5359
+ <div>
5360
+ <div class="mero-page-head-title">
5361
+ <h1>acme-production</h1>
5362
+ <span class="mero-badge mero-badge-success">Live</span>
5363
+ </div>
5364
+ <p>Acme Corporation · Europe West · Updated 4 minutes ago</p>
5365
+ </div>
5366
+ <div class="mero-page-head-actions">
5367
+ <button class="mero-button mero-button-outline" type="button" data-mero-toast="Suspend requested">Suspend</button>
5368
+ <a class="mero-button mero-button-primary" href="/components/typed-confirmation">Deploy release</a>
5369
+ </div>
5370
+ </header>
5371
+ ````
5372
+
4666
5373
  # Separator
4667
5374
 
4668
- Mero UI 0.7.0 · Layout
5375
+ Mero UI 0.9.0 · Layout
4669
5376
 
4670
5377
  Separate related content sections using a semantic rule.
4671
5378
 
@@ -4690,7 +5397,7 @@ Template
4690
5397
 
4691
5398
  # Surface
4692
5399
 
4693
- Mero UI 0.7.0 · Layout
5400
+ Mero UI 0.9.0 · Layout
4694
5401
 
4695
5402
  Give related content a tonal background with shared theme tokens.
4696
5403
 
@@ -4714,7 +5421,7 @@ Template
4714
5421
 
4715
5422
  # Toolbar
4716
5423
 
4717
- Mero UI 0.7.0 · Layout
5424
+ Mero UI 0.9.0 · Layout
4718
5425
 
4719
5426
  Keep nearby actions aligned and grouped by purpose.
4720
5427
 
@@ -4741,7 +5448,7 @@ Template
4741
5448
 
4742
5449
  # Avatar
4743
5450
 
4744
- Mero UI 0.7.0 · Media
5451
+ Mero UI 0.9.0 · Media
4745
5452
 
4746
5453
  Represent a person with initials and an accessible name.
4747
5454
 
@@ -4765,7 +5472,7 @@ Template
4765
5472
 
4766
5473
  # Avatar Group
4767
5474
 
4768
- Mero UI 0.7.0 · Media
5475
+ Mero UI 0.9.0 · Media
4769
5476
 
4770
5477
  Show a compact cluster of people associated with a workspace.
4771
5478
 
@@ -4790,7 +5497,7 @@ Template
4790
5497
 
4791
5498
  # Autocomplete
4792
5499
 
4793
- Mero UI 0.7.0 · Pickers
5500
+ Mero UI 0.9.0 · Pickers
4794
5501
 
4795
5502
  Request matching options from the server as a user types.
4796
5503
 
@@ -4870,7 +5577,7 @@ Template
4870
5577
 
4871
5578
  # Combo Box
4872
5579
 
4873
- Mero UI 0.7.0 · Pickers
5580
+ Mero UI 0.9.0 · Pickers
4874
5581
 
4875
5582
  Filter and select from suggestions already on the page.
4876
5583
 
@@ -4910,7 +5617,7 @@ Template
4910
5617
 
4911
5618
  # Select
4912
5619
 
4913
- Mero UI 0.7.0 · Pickers
5620
+ Mero UI 0.9.0 · Pickers
4914
5621
 
4915
5622
  Choose one of a fixed set of values using the platform’s picker.
4916
5623
 
@@ -4940,7 +5647,7 @@ Template
4940
5647
 
4941
5648
  # Kbd
4942
5649
 
4943
- Mero UI 0.7.0 · Typography
5650
+ Mero UI 0.9.0 · Typography
4944
5651
 
4945
5652
  Format a keyboard shortcut with native semantics.
4946
5653
 
@@ -4959,9 +5666,40 @@ Template
4959
5666
  <p class="mero-text">Use <kbd class="mero-kbd">Tab</kbd> to move to the next control.</p>
4960
5667
  ````
4961
5668
 
5669
+ ## Keyboard shortcuts
5670
+
5671
+ Act on single keys and two-key sequences, with a switch to turn them off.
5672
+
5673
+ Shortcuts are ignored while the person types in a field, works in a menu, list, tab list or grid, or holds Ctrl, Cmd or Alt. A field takes focus; anything else is clicked. A two-key sequence such as g r must be finished within 1.5 seconds. WCAG 2.1.4 requires a way to turn single-key shortcuts off: the data-mero-shortcuts-toggle control does that for every page in this browser, and Mero updates aria-keyshortcuts to match.
5674
+
5675
+ Page assets
5676
+
5677
+ ```html
5678
+ <link rel="stylesheet" href="/mero.css">
5679
+ <script defer src="/mero.js"></script>
5680
+ ```
5681
+
5682
+ Template
5683
+
5684
+ ````html
5685
+ <div class="mero-scope" data-mero-scope>
5686
+ <div class="mero-stack">
5687
+ <div class="mero-field">
5688
+ <label class="mero-label" for="shortcut-demo-search">Search <kbd class="mero-kbd">/</kbd></label>
5689
+ <input class="mero-input" id="shortcut-demo-search" type="search" data-mero-shortcut="/">
5690
+ </div>
5691
+ <div class="mero-row">
5692
+ <button class="mero-button mero-button-secondary" type="button" data-mero-shortcut="n" data-mero-toast="New draft started">New draft <kbd class="mero-kbd">N</kbd></button>
5693
+ <button class="mero-button mero-button-secondary" type="button" data-mero-shortcut="g r" data-mero-toast="Opened reports">Reports <kbd class="mero-kbd">G</kbd> <kbd class="mero-kbd">R</kbd></button>
5694
+ </div>
5695
+ <label class="mero-row"><input class="mero-checkbox" type="checkbox" data-mero-shortcuts-toggle checked> Single-key shortcuts</label>
5696
+ </div>
5697
+ </div>
5698
+ ````
5699
+
4962
5700
  # Typography
4963
5701
 
4964
- Mero UI 0.7.0 · Typography
5702
+ Mero UI 0.9.0 · Typography
4965
5703
 
4966
5704
  Apply the type scale to semantic content.
4967
5705
 
@@ -4984,9 +5722,32 @@ Template
4984
5722
  </article>
4985
5723
  ````
4986
5724
 
5725
+ ## Local time
5726
+
5727
+ Show server timestamps in the reader’s locale and time zone.
5728
+
5729
+ Render the UTC time as text so the page reads correctly without scripts. Mero rewrites the text from datetime: absolute shows the date and time, date and time show one part, and relative shows how long ago or until, refreshed every minute, with the full date in the title. After a swap or morph Mero formats the new elements again.
5730
+
5731
+ Page assets
5732
+
5733
+ ```html
5734
+ <link rel="stylesheet" href="/mero.css">
5735
+ <script defer src="/mero.js"></script>
5736
+ ```
5737
+
5738
+ Template
5739
+
5740
+ ````html
5741
+ <dl class="mero-stack">
5742
+ <div><dt class="mero-label">Deployed</dt><dd><time datetime="2026-11-23T09:41:00Z" data-mero-time="relative">2026-11-23 09:41 UTC</time></dd></div>
5743
+ <div><dt class="mero-label">Created</dt><dd><time datetime="2026-11-21T16:05:00Z" data-mero-time="absolute">2026-11-21 16:05 UTC</time></dd></div>
5744
+ <div><dt class="mero-label">Expires</dt><dd><time datetime="2026-12-23T00:00:00Z" data-mero-time="date">2026-12-23 UTC</time></dd></div>
5745
+ </dl>
5746
+ ````
5747
+
4987
5748
  # Badge
4988
5749
 
4989
- Mero UI 0.7.0 · Data display
5750
+ Mero UI 0.9.0 · Data display
4990
5751
 
4991
5752
  Label a status using text and a semantic tone.
4992
5753
 
@@ -5011,7 +5772,7 @@ Template
5011
5772
 
5012
5773
  # Chip
5013
5774
 
5014
- Mero UI 0.7.0 · Data display
5775
+ Mero UI 0.9.0 · Data display
5015
5776
 
5016
5777
  Display a lightweight label for an attribute or filter value.
5017
5778
 
@@ -5030,14 +5791,45 @@ Template
5030
5791
  <span class="mero-chip">Europe West</span>
5031
5792
  ````
5032
5793
 
5794
+ # Description List
5795
+
5796
+ Mero UI 0.9.0 · Data display
5797
+
5798
+ Show a record’s fields as label and value pairs.
5799
+
5800
+ ## Default
5801
+
5802
+ Wrap each dt and its dd in a div. Labels and values share a row from 768 px and stack below it. Put identifiers, hashes and keys in code for a monospace value; long values wrap instead of widening the page. Values can hold badges, links and other inline components.
5803
+
5804
+ Page assets
5805
+
5806
+ ```html
5807
+ <link rel="stylesheet" href="/mero.css">
5808
+ <script defer src="/mero.js"></script>
5809
+ ```
5810
+
5811
+ Template
5812
+
5813
+ ````html
5814
+ <dl class="mero-description-list">
5815
+ <div><dt>Environment</dt><dd>Production</dd></div>
5816
+ <div><dt>Status</dt><dd><span class="mero-badge mero-badge-success">Live</span></dd></div>
5817
+ <div><dt>Release</dt><dd><code>rel_01HZX3K9Q4F7WM2D8B6N</code></dd></div>
5818
+ <div><dt>Region</dt><dd>Europe West</dd></div>
5819
+ <div><dt>Owner</dt><dd><a class="mero-link" href="/components/sortable-table">Studio North</a></dd></div>
5820
+ </dl>
5821
+ ````
5822
+
5033
5823
  # Table
5034
5824
 
5035
- Mero UI 0.7.0 · Data display
5825
+ Mero UI 0.9.0 · Data display
5036
5826
 
5037
5827
  Show comparable records in a native table with column headers.
5038
5828
 
5039
5829
  ## Default
5040
5830
 
5831
+ Use scope on the headers. The wrapper scrolls a wide table sideways instead of widening the page.
5832
+
5041
5833
  Page assets
5042
5834
 
5043
5835
  ```html
@@ -5060,9 +5852,64 @@ Template
5060
5852
  </div>
5061
5853
  ````
5062
5854
 
5855
+ ## Cards on phones
5856
+
5857
+ Show rows as labelled cards on phones, with numbers aligned for comparison.
5858
+
5859
+ Add mero-table-cards to the wrapper for cards below 768 px, keep the table roles so screen readers still navigate rows and cells, and start each cell with its data-mero-cell-label. Put data-mero-card-hidden on a column's header and cells to leave it out of the cards. Give numeric headers and cells mero-table-num so they end-align with tabular figures in the table; in a card the value follows its label.
5860
+
5861
+ Page assets
5862
+
5863
+ ```html
5864
+ <link rel="stylesheet" href="/mero.css">
5865
+ <script defer src="/mero.js"></script>
5866
+ ```
5867
+
5868
+ Template
5869
+
5870
+ ````html
5871
+ <div class="mero-table-wrap mero-table-cards">
5872
+ <table class="mero-table" role="table">
5873
+ <caption>Environments</caption>
5874
+ <thead role="rowgroup">
5875
+ <tr role="row">
5876
+ <th role="columnheader" scope="col">Environment</th>
5877
+ <th role="columnheader" scope="col" data-mero-card-hidden>Region</th>
5878
+ <th role="columnheader" scope="col">Status</th>
5879
+ <th role="columnheader" scope="col" class="mero-table-num">Deploys</th>
5880
+ <th role="columnheader" scope="col" class="mero-table-num">Error rate</th>
5881
+ </tr>
5882
+ </thead>
5883
+ <tbody role="rowgroup">
5884
+ <tr role="row">
5885
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Environment</span>acme-production</th>
5886
+ <td role="cell" data-mero-card-hidden><span data-mero-cell-label aria-hidden="true">Region</span>Europe West</td>
5887
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-success">Live</span></td>
5888
+ <td role="cell" class="mero-table-num"><span data-mero-cell-label aria-hidden="true">Deploys</span>1,284</td>
5889
+ <td role="cell" class="mero-table-num"><span data-mero-cell-label aria-hidden="true">Error rate</span>0.02%</td>
5890
+ </tr>
5891
+ <tr role="row">
5892
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Environment</span>acme-staging</th>
5893
+ <td role="cell" data-mero-card-hidden><span data-mero-cell-label aria-hidden="true">Region</span>Europe West</td>
5894
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-warning">Review</span></td>
5895
+ <td role="cell" class="mero-table-num"><span data-mero-cell-label aria-hidden="true">Deploys</span>96</td>
5896
+ <td role="cell" class="mero-table-num"><span data-mero-cell-label aria-hidden="true">Error rate</span>1.40%</td>
5897
+ </tr>
5898
+ <tr role="row">
5899
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Environment</span>globex-production</th>
5900
+ <td role="cell" data-mero-card-hidden><span data-mero-cell-label aria-hidden="true">Region</span>US East</td>
5901
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-success">Live</span></td>
5902
+ <td role="cell" class="mero-table-num"><span data-mero-cell-label aria-hidden="true">Deploys</span>12</td>
5903
+ <td role="cell" class="mero-table-num"><span data-mero-cell-label aria-hidden="true">Error rate</span>0.00%</td>
5904
+ </tr>
5905
+ </tbody>
5906
+ </table>
5907
+ </div>
5908
+ ````
5909
+
5063
5910
  # Sortable Table
5064
5911
 
5065
- Mero UI 0.7.0 · Data display
5912
+ Mero UI 0.9.0 · Data display
5066
5913
 
5067
5914
  Sort server-rendered rows from the column headers and open a row from anywhere in it.
5068
5915
 
@@ -5364,7 +6211,7 @@ Template
5364
6211
 
5365
6212
  # Filter Chips
5366
6213
 
5367
- Mero UI 0.7.0 · Data display
6214
+ Mero UI 0.9.0 · Data display
5368
6215
 
5369
6216
  Add filters from a menu, see them as chips and remove them one at a time. The URL keeps the state.
5370
6217
 
@@ -5512,7 +6359,7 @@ Template
5512
6359
 
5513
6360
  # Color Area
5514
6361
 
5515
- Mero UI 0.7.0 · Colors
6362
+ Mero UI 0.9.0 · Colors
5516
6363
 
5517
6364
  Open a browser-managed color surface and submit the selected color.
5518
6365
 
@@ -5541,7 +6388,7 @@ Template
5541
6388
 
5542
6389
  # Color Field
5543
6390
 
5544
- Mero UI 0.7.0 · Colors
6391
+ Mero UI 0.9.0 · Colors
5545
6392
 
5546
6393
  Enter a six-digit hex value directly in a text field.
5547
6394
 
@@ -5570,7 +6417,7 @@ Template
5570
6417
 
5571
6418
  # Color Picker
5572
6419
 
5573
- Mero UI 0.7.0 · Colors
6420
+ Mero UI 0.9.0 · Colors
5574
6421
 
5575
6422
  Choose a color using the native picker UI.
5576
6423
 
@@ -5597,7 +6444,7 @@ Template
5597
6444
 
5598
6445
  # Color Slider
5599
6446
 
5600
- Mero UI 0.7.0 · Colors
6447
+ Mero UI 0.9.0 · Colors
5601
6448
 
5602
6449
  Adjust a hue along the color spectrum.
5603
6450
 
@@ -5627,7 +6474,7 @@ Template
5627
6474
 
5628
6475
  # Color Swatch
5629
6476
 
5630
- Mero UI 0.7.0 · Colors
6477
+ Mero UI 0.9.0 · Colors
5631
6478
 
5632
6479
  Show a color with its human-readable label.
5633
6480
 
@@ -5652,7 +6499,7 @@ Template
5652
6499
 
5653
6500
  # Scroll Shadow
5654
6501
 
5655
- Mero UI 0.7.0 · Utilities
6502
+ Mero UI 0.9.0 · Utilities
5656
6503
 
5657
6504
  Expose a scrollable region with a visual cue that more content is available.
5658
6505
 
@@ -5680,9 +6527,35 @@ Template
5680
6527
  </div>
5681
6528
  ````
5682
6529
 
6530
+ # Visually Hidden
6531
+
6532
+ Mero UI 0.9.0 · Utilities
6533
+
6534
+ Give screen readers context that the visible text leaves implied.
6535
+
6536
+ ## Default
6537
+
6538
+ Put the hidden words inside the element they describe, with a leading space, so the accessible name reads as one phrase: Copy release ID. The text stays in the accessibility tree and in copied text, takes no space and never widens a scrolling container. Don't hide focusable elements this way.
6539
+
6540
+ Page assets
6541
+
6542
+ ```html
6543
+ <link rel="stylesheet" href="/mero.css">
6544
+ <script defer src="/mero.js"></script>
6545
+ ```
6546
+
6547
+ Template
6548
+
6549
+ ````html
6550
+ <div class="mero-row">
6551
+ <button class="mero-button mero-button-outline mero-button-sm" type="button" data-mero-toast="Release ID copied">Copy<span class="mero-sr-only"> release ID</span></button>
6552
+ <span class="mero-badge mero-badge-warning">3<span class="mero-sr-only"> environments need attention</span></span>
6553
+ </div>
6554
+ ````
6555
+
5683
6556
  # Join
5684
6557
 
5685
- Mero UI 0.7.0 · Composition
6558
+ Mero UI 0.9.0 · Composition
5686
6559
 
5687
6560
  Connect related controls with a shared outline.
5688
6561
 
@@ -5705,7 +6578,7 @@ Template
5705
6578
 
5706
6579
  # Menu
5707
6580
 
5708
- Mero UI 0.7.0 · Composition
6581
+ Mero UI 0.9.0 · Composition
5709
6582
 
5710
6583
  Group destinations with an active page and section labels.
5711
6584
 
@@ -5728,7 +6601,7 @@ Template
5728
6601
 
5729
6602
  # Hero
5730
6603
 
5731
- Mero UI 0.7.0 · Composition
6604
+ Mero UI 0.9.0 · Composition
5732
6605
 
5733
6606
  Pair a product introduction with a single destination.
5734
6607
 
@@ -5753,7 +6626,7 @@ Template
5753
6626
 
5754
6627
  # Footer
5755
6628
 
5756
- Mero UI 0.7.0 · Composition
6629
+ Mero UI 0.9.0 · Composition
5757
6630
 
5758
6631
  Close a workspace with a small group of navigation links.
5759
6632
 
@@ -5776,7 +6649,7 @@ Template
5776
6649
 
5777
6650
  # Theme Controller
5778
6651
 
5779
- Mero UI 0.7.0 · Composition
6652
+ Mero UI 0.9.0 · Composition
5780
6653
 
5781
6654
  Set a theme inside one section of a page.
5782
6655
 
@@ -5799,7 +6672,7 @@ Template
5799
6672
 
5800
6673
  # Validator
5801
6674
 
5802
- Mero UI 0.7.0 · Composition
6675
+ Mero UI 0.9.0 · Composition
5803
6676
 
5804
6677
  Show a native field constraint and its correction.
5805
6678
 
@@ -5824,7 +6697,7 @@ Template
5824
6697
 
5825
6698
  # Aura
5826
6699
 
5827
- Mero UI 0.7.0 · Display utilities
6700
+ Mero UI 0.9.0 · Display utilities
5828
6701
 
5829
6702
  Frame an interactive surface with a subtle moving highlight.
5830
6703
 
@@ -5847,7 +6720,7 @@ Template
5847
6720
 
5848
6721
  # Countdown
5849
6722
 
5850
- Mero UI 0.7.0 · Display utilities
6723
+ Mero UI 0.9.0 · Display utilities
5851
6724
 
5852
6725
  Show the time remaining until the next daily shipping cutoff.
5853
6726
 
@@ -5872,7 +6745,7 @@ Template
5872
6745
 
5873
6746
  # Indicator
5874
6747
 
5875
- Mero UI 0.7.0 · Display utilities
6748
+ Mero UI 0.9.0 · Display utilities
5876
6749
 
5877
6750
  Anchor a quantity to an icon or action.
5878
6751
 
@@ -5895,7 +6768,7 @@ Template
5895
6768
 
5896
6769
  # Mask
5897
6770
 
5898
- Mero UI 0.7.0 · Display utilities
6771
+ Mero UI 0.9.0 · Display utilities
5899
6772
 
5900
6773
  Crop an image while keeping its alternative text.
5901
6774
 
@@ -5920,7 +6793,7 @@ Template
5920
6793
 
5921
6794
  # Stack
5922
6795
 
5923
- Mero UI 0.7.0 · Display utilities
6796
+ Mero UI 0.9.0 · Display utilities
5924
6797
 
5925
6798
  Layer related previews while keeping the current item legible.
5926
6799
 
@@ -5945,7 +6818,7 @@ Template
5945
6818
 
5946
6819
  # Status
5947
6820
 
5948
- Mero UI 0.7.0 · Display utilities
6821
+ Mero UI 0.9.0 · Display utilities
5949
6822
 
5950
6823
  Show system status with a label and a visual marker.
5951
6824
 
@@ -5968,7 +6841,7 @@ Template
5968
6841
 
5969
6842
  # Swap
5970
6843
 
5971
- Mero UI 0.7.0 · Display utilities
6844
+ Mero UI 0.9.0 · Display utilities
5972
6845
 
5973
6846
  Switch between two labels or icons on a native control.
5974
6847
 
@@ -5991,7 +6864,7 @@ Template
5991
6864
 
5992
6865
  # Text Rotate
5993
6866
 
5994
- Mero UI 0.7.0 · Display utilities
6867
+ Mero UI 0.9.0 · Display utilities
5995
6868
 
5996
6869
  Rotate through short messages with explicit playback controls.
5997
6870
 
@@ -6014,7 +6887,7 @@ Template
6014
6887
 
6015
6888
  # Browser Mockup
6016
6889
 
6017
- Mero UI 0.7.0 · Mockups
6890
+ Mero UI 0.9.0 · Mockups
6018
6891
 
6019
6892
  Present a site preview inside a compact browser frame.
6020
6893
 
@@ -6039,7 +6912,7 @@ Template
6039
6912
 
6040
6913
  # Phone Mockup
6041
6914
 
6042
- Mero UI 0.7.0 · Mockups
6915
+ Mero UI 0.9.0 · Mockups
6043
6916
 
6044
6917
  Frame a mobile product screen.
6045
6918
 
@@ -6064,7 +6937,7 @@ Template
6064
6937
 
6065
6938
  # Window Mockup
6066
6939
 
6067
- Mero UI 0.7.0 · Mockups
6940
+ Mero UI 0.9.0 · Mockups
6068
6941
 
6069
6942
  Place a desktop tool inside a labelled window.
6070
6943
 
@@ -6087,7 +6960,7 @@ Template
6087
6960
 
6088
6961
  # Code Mockup
6089
6962
 
6090
- Mero UI 0.7.0 · Mockups
6963
+ Mero UI 0.9.0 · Mockups
6091
6964
 
6092
6965
  Present a terminal command and its output.
6093
6966