moey-ui 0.2.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to Moey. The format follows [Keep a Changelog](https://keepachangelog.com/), and versions follow [Semantic Versioning](https://semver.org/) (before 1.0, a minor version may change things that already exist).
4
4
 
5
+ ## 0.3.0 - 2026-11-28
6
+
7
+ - **Masonry is now Griddy.** `.griddy`, `data-moey-griddy`, `.griddy-dense`, `--mo-griddy-min` and `Moey.griddy()`, with its own docs page next to CSS Grid. The old names (`.masonry`, `.masonry-dense`, `--mo-masonry-min`, `data-moey-masonry`, `Moey.masonry()`) still work, and the old docs address forwards to the new page.
8
+ - **New: gliding.** `.griddy-glide` makes the items already on the page slide to their new place (.4s) when the layout changes: an item gets wider, the columns or the gap change, the window is resized, a filter hides some. An item placed for the first time goes straight to its spot, so new items never fly in from a corner. Griddy now also lays out again when a class changes the columns, the gap or an item's width, and when fonts arrive.
9
+ - **New: more ways to arrive.** `data-moey-enter` takes a value: `pop` (grows from nothing, 55ms apart), `rise`, `drop`, `fade`, `zoom`, `slide`, `flip`, `blur` or `none`. No value is today's fade up. `data-moey-enter-first` makes the items already on the page arrive too, `Moey.enter(list, items?)` plays it again, and `--mo-enter-stagger` sets the wait between items. Items appended by any script arrive, not only Moey's infinite scroll.
10
+ - **Infinite scroll: `data-moey-infinite="once"`** shows the Load more button the first time, then loads by itself (up to `data-moey-infinite-auto` loads, then the button again). `data-moey-infinite-auto="all"` never stops, and `data-moey-infinite-more` changes the button's words.
11
+ - **The Load more button stays in place while loading**, with a spinner and "Loading…" inside it, instead of being replaced by a spinner, so nothing on the page jumps. If the button goes away after a click, keyboard focus moves to the first new item.
12
+ - **Fixed: `data-moey-infinite="button"` always waits for the button**, as documented. One click used to turn on automatic loading for 3 more pages.
13
+ - **Dialogs, drawers and sheets close smoothly.** While closing, their parts used to fall out of their top-to-bottom layout into one row for a moment, so the content jumped and flickered. They now keep their exact size and layout until they're gone, and a dialog closes with a plain fade instead of shrinking.
14
+ - **Lighter scrolling: no blur behind floating bars by default.** The app header, tab bar, sticky form buttons and chat day labels are now slightly see-through (97%, the new `--mo-glass` setting) instead of frosted, and the video play button is a solid dark circle. A blur is redrawn every time the page moves behind it, which costs smoothness and battery on older phones.
15
+ - **New: `.frosted`** brings the frosted-glass look back on any of those bars, or on anything with a background. `.navbar-blur` still does the same for the navbar.
16
+ - **Embeds are generic: Moey no longer knows about any video site.** The lightbox has a new `data-type="embed"` for any video player's embed address (shown in a 16:9 frame), and click-to-load embeds (`data-moey-embed`) load `data-src` (else `href`) exactly as given. **Changed:** YouTube and Vimeo links are no longer recognized or rewritten; use the site's embed address with `data-type="embed"` in the lightbox, or in `data-src` for an embed, with the site's own options (autoplay, privacy mode) in the address.
17
+ - **Dialogs open faster.** The 2px blur behind dialogs, drawers, sheets and the command palette is gone (the dim stays). It was barely visible, but it stalled the first opening in a browser session by about 0.1s and made every frame of the animation heavier: the first opening's slowest frame went from 146ms to 49ms, later ones from 28ms to 21ms.
18
+ - **The command palette closes smoothly too**, with the same plain fade and no reflow.
19
+ - **A flush list straight in a card or dialog lines up.** A `.list-group-flush` placed directly in a `.card` (no `.card-body` around it), or directly in a dialog, drawer or sheet, had no side padding, so its rows touched the edges. It now gets the card's or dialog's padding and lines up with the title.
20
+ - **Data tables, expandable rows:** the detail panel is inset evenly (it had no space above it).
21
+ - **Data tables, grouped rows:** no empty strip between the header and the first group. Group headers now stick at the header's real height instead of a guessed 44px.
22
+ - **Data tables, checkboxes with a fixed first column:** the name column's header stays above the rows scrolling under it, and the name column sits flush against the checkbox column, with no gap showing other columns through.
23
+ - **Sortable headers:** right-aligned ones (Total, Price) no longer sit 2px higher than the others.
24
+ - **Phone sheets from menus, selects and pickers slide away.** On phones they used to vanish in one frame when closed; now they slide back down at full size, the reverse of how they open.
25
+
5
26
  ## 0.2.0 - 2026-11-26
6
27
 
7
28
  - **Masonry places items exactly.** Each item gets its own position (the shortest column so far) instead of 1px grid rows. It measures the real layout size, so zoom, scaling or an entrance animation no longer makes items overlap; gaps stay exact on long pages; and very long feeds work in every browser (Firefox stops 1px grid rows at about 10,000px).
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
- <img src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/brand/moey-icon.svg" width="64" height="64" alt="Moey logo">
1
+ <img src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/brand/moey-icon.svg" width="64" height="64" alt="Moey logo">
2
2
 
3
3
  # Moey
4
4
 
5
5
  A clean, mobile-first front-end framework for admin dashboards, productivity apps and websites — plain HTML, one stylesheet and one script. No dependencies, no build step.
6
6
 
7
+ **Docs, live examples and the changelog: [moey.dev](https://moey.dev)**
8
+
7
9
  Moey takes the best ideas from the popular frameworks (Tailwind, Bulma, Bootstrap, shadcn, DaisyUI, Tamagui and others) and puts them into one consistent, carefully tested toolkit: cascade layers, OKLCH colors, light and dark mode, right-to-left, and a variable icon font.
8
10
 
9
11
  ## Why Moey
@@ -22,14 +24,14 @@ Moey takes the best ideas from the popular frameworks (Tailwind, Bulma, Bootstra
22
24
  From a CDN (nothing to download):
23
25
 
24
26
  ```html
25
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.css">
27
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.css">
26
28
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
27
- <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.js" defer></script>
29
+ <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.js" defer></script>
28
30
  ```
29
31
 
30
32
  Or from npm — `npm i moey-ui moey-icons` — and link the same files from `node_modules/moey-ui/dist/` (or copy `dist/` into your site). Keep `dist/fonts/` next to the stylesheet: Inter and JetBrains Mono are self-hosted (no Google Fonts, no outside requests), and browsers only download the language subsets a page uses.
31
33
 
32
- Moey Icons are a separate package (`moey-icons`, [icons.nakedtuxedo.com](https://icons.nakedtuxedo.com)); Moey works with any icon set, but its docs and examples use them.
34
+ Moey Icons are a separate package (`moey-icons`, [icons.moey.dev](https://icons.moey.dev)); Moey works with any icon set, but its docs and examples use them.
33
35
 
34
36
  ## What's inside
35
37
 
package/dist/ai-rules.md CHANGED
@@ -51,7 +51,7 @@ Moey is a mobile-first CSS + JS framework: one stylesheet (`moey.css`), one scri
51
51
 
52
52
  ## Helpers
53
53
 
54
- `stack` (column, gap 16px) · `hstack` (row, centered, gap 12px) · `cluster` (wrapping row) · `spacer` (pushes the rest away) · `stretched-link` (whole card clickable) · `hover-lift` · `focus-ring` · `icon-link icon-link-hover` · `sticky-top fixed-bottom` · `rtl-flip` (mirror an arrow icon in RTL)
54
+ `stack` (column, gap 16px) · `hstack` (row, centered, gap 12px) · `cluster` (wrapping row) · `spacer` (pushes the rest away) · `stretched-link` (whole card clickable) · `hover-lift` · `frosted` (frosted glass on a bar: tab bar, app header, sticky form buttons; bars are only slightly see-through by default, `--mo-glass`) · `focus-ring` · `icon-link icon-link-hover` · `sticky-top fixed-bottom` · `rtl-flip` (mirror an arrow icon in RTL)
55
55
 
56
56
  ## Layout
57
57
 
@@ -194,15 +194,15 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
194
194
 
195
195
  **Data table, more**: `data-moey-virtual` / `virtual: true` for thousands of rows; `detail: (row) => html` or `<template data-moey-detail>` for expandable rows; `children: [...]` or `<tr data-parent="id">` for tree rows; `groupBy: 'status'` / `data-moey-group-by` with `sum: true` / `data-moey-sum` for grouped rows. Never put a table inside a table cell.
196
196
 
197
- **Masonry**: `<div class="masonry grid-cols-2 md:grid-cols-4 gap-3" data-moey-masonry>…items…</div>` (images need width/height); `span-2` wide items, `.masonry-dense` fills holes, add `data-moey-sortable` to rearrange, `data-moey-enter` (any list or grid) animates items added later. `.gallery-tile` + `.gallery-caption` for picture tiles.
197
+ **Griddy** (items of different heights packed into columns): `<div class="griddy grid-cols-2 md:grid-cols-4 gap-3" data-moey-griddy>…items…</div>` (images need width/height); `span-2` wide items, `.griddy-dense` fills holes, `.griddy-glide` makes items glide when the layout changes, add `data-moey-sortable` to rearrange. `data-moey-enter="pop|rise|drop|fade|zoom|slide|flip|blur|none"` (any list or grid) animates items added later, `data-moey-enter-first` the first page too, `Moey.enter(list)` replays. `.gallery-tile` + `.gallery-caption` for picture tiles. (Old names `.masonry` / `data-moey-masonry` still work; use griddy.)
198
198
 
199
199
  **Filter & sort**: buttons in `<div data-moey-filters="#items">` with `data-moey-filter="tag"` (`"*"` = all) and `data-moey-sort-by="date"` (+ `data-moey-sort-dir="desc"`); items carry `data-tags="a b"` and `data-date`…; `data-moey-filter-search="#items"`, `data-moey-filter-count="#items"`, a `.filter-empty` inside.
200
200
 
201
201
  **Infinite scroll**: `data-moey-infinite` on the list; `moey:load` → append items inside `e.detail.waitUntil(promise)`, call `e.detail.done()` on the last page. A "Load more" button takes over after 3 loads.
202
202
 
203
- **Lightbox**: `data-moey-lightbox` on a gallery: `<a href="big.jpg" data-caption="…"><img src="small.jpg" alt="…"></a>` — also video (.mp4), audio (.mp3), YouTube/Vimeo links, `data-type="iframe"` pages/PDFs, `href="#template-id"` HTML. Parts: `data-moey-lightbox-thumbs="auto|always|never"`, `-counter`, `-caption`, `-zoom`, `-loop`, `-download`, `-share`, `-fullscreen`, `-slideshow="4000"` ("false" turns off). `data-moey-lightbox="name"` groups links across the page. `Moey.lightbox.open([...], options)`.
203
+ **Lightbox**: `data-moey-lightbox` on a gallery: `<a href="big.jpg" data-caption="…"><img src="small.jpg" alt="…"></a>` — also video (.mp4), audio (.mp3), a video site's embed address with `data-type="embed"`, `data-type="iframe"` pages/PDFs, `href="#template-id"` HTML. Parts: `data-moey-lightbox-thumbs="auto|always|never"`, `-counter`, `-caption`, `-zoom`, `-loop`, `-download`, `-share`, `-fullscreen`, `-slideshow="4000"` ("false" turns off). `data-moey-lightbox="name"` groups links across the page. `Moey.lightbox.open([...], options)`.
204
204
 
205
- **Audio & video**: `<div class="player" data-moey-player><video src="…" poster="…"></video></div>` (or `<audio>`, with `.player-head` > `.player-cover` + `.player-title`); `data-moey-controls="speed volume captions pip fullscreen"` or `"none"`. A file that can't play shows a message + Try again by itself (`data-moey-error-text`, event `moey:player-error`). Embeds that load on click: `<a class="embed" href="https://www.youtube.com/watch?v=…" data-moey-embed><img src="cover.jpg" alt=""><span class="embed-play"></span><span class="embed-title">…</span></a>` (`.embed-9x16` for Shorts). Never paste a raw YouTube iframe.
205
+ **Audio & video**: `<div class="player" data-moey-player><video src="…" poster="…"></video></div>` (or `<audio>`, with `.player-head` > `.player-cover` + `.player-title`); `data-moey-controls="speed volume captions pip fullscreen"` or `"none"`. A file that can't play shows a message + Try again by itself (`data-moey-error-text`, event `moey:player-error`). Embeds that load on click: `<a class="embed" href="the video page" data-src="the site's embed address" data-moey-embed><img src="cover.jpg" alt=""><span class="embed-play"></span><span class="embed-title">…</span></a>` (`data-src` is loaded exactly as given; `.embed-9x16` for vertical clips). Never paste a raw video-site iframe into a page.
206
206
 
207
207
  **Marquee** (logos, testimonials, tickers): `<div class="marquee" data-moey-marquee aria-label="…"><ul class="marquee-group"><li>…</li></ul></div>` — `data-moey-speed`, `.marquee-reverse`, `.marquee-vertical` (with a height). It pauses on hover/focus and has a pause button; don't remove it without another way to stop it.
208
208
 
@@ -229,7 +229,7 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
229
229
 
230
230
  ## JavaScript API (only when needed)
231
231
 
232
- `Moey.toast()` · `Moey.confirm() / alert() / prompt()` · `Moey.open(el) / close(el)` · `Moey.tab()` · `Moey.tags()` · `Moey.chips()` · `Moey.toggle()` · `Moey.datatable()` · `Moey.select()` · `Moey.datepicker()` · `Moey.combobox()` · `Moey.palette()` · `Moey.notify()` · `Moey.clean(form)` · `Moey.chart()` · `Moey.kanban()` · `Moey.split()` · `Moey.calendar()` · `Moey.swipe()` · `Moey.refresh()` · `Moey.sortable()` · `Moey.timepicker()` · `Moey.chat()` · `Moey.shortcuts` · `Moey.tour()` · `Moey.marquee()` · `Moey.masonry()` · `Moey.filter()` · `Moey.infinite()` · `Moey.lightbox` · `Moey.player()`. Events are `moey:*` (e.g. `moey:select`, `moey:change`, `moey:open`, `moey:close`).
232
+ `Moey.toast()` · `Moey.confirm() / alert() / prompt()` · `Moey.open(el) / close(el)` · `Moey.tab()` · `Moey.tags()` · `Moey.chips()` · `Moey.toggle()` · `Moey.datatable()` · `Moey.select()` · `Moey.datepicker()` · `Moey.combobox()` · `Moey.palette()` · `Moey.notify()` · `Moey.clean(form)` · `Moey.chart()` · `Moey.kanban()` · `Moey.split()` · `Moey.calendar()` · `Moey.swipe()` · `Moey.refresh()` · `Moey.sortable()` · `Moey.timepicker()` · `Moey.chat()` · `Moey.shortcuts` · `Moey.tour()` · `Moey.marquee()` · `Moey.griddy()` · `Moey.enter()` · `Moey.filter()` · `Moey.infinite()` · `Moey.lightbox` · `Moey.player()`. Events are `moey:*` (e.g. `moey:select`, `moey:change`, `moey:open`, `moey:close`).
233
233
 
234
234
  ## Common mistakes to avoid
235
235
 
@@ -51,7 +51,7 @@ Moey is a mobile-first CSS + JS framework: one stylesheet (`moey.css`), one scri
51
51
 
52
52
  ## Helpers
53
53
 
54
- `stack` (column, gap 16px) · `hstack` (row, centered, gap 12px) · `cluster` (wrapping row) · `spacer` (pushes the rest away) · `stretched-link` (whole card clickable) · `hover-lift` · `focus-ring` · `icon-link icon-link-hover` · `sticky-top fixed-bottom` · `rtl-flip` (mirror an arrow icon in RTL)
54
+ `stack` (column, gap 16px) · `hstack` (row, centered, gap 12px) · `cluster` (wrapping row) · `spacer` (pushes the rest away) · `stretched-link` (whole card clickable) · `hover-lift` · `frosted` (frosted glass on a bar: tab bar, app header, sticky form buttons; bars are only slightly see-through by default, `--mo-glass`) · `focus-ring` · `icon-link icon-link-hover` · `sticky-top fixed-bottom` · `rtl-flip` (mirror an arrow icon in RTL)
55
55
 
56
56
  ## Layout
57
57
 
@@ -194,15 +194,15 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
194
194
 
195
195
  **Data table, more**: `data-moey-virtual` / `virtual: true` for thousands of rows; `detail: (row) => html` or `<template data-moey-detail>` for expandable rows; `children: [...]` or `<tr data-parent="id">` for tree rows; `groupBy: 'status'` / `data-moey-group-by` with `sum: true` / `data-moey-sum` for grouped rows. Never put a table inside a table cell.
196
196
 
197
- **Masonry**: `<div class="masonry grid-cols-2 md:grid-cols-4 gap-3" data-moey-masonry>…items…</div>` (images need width/height); `span-2` wide items, `.masonry-dense` fills holes, add `data-moey-sortable` to rearrange, `data-moey-enter` (any list or grid) animates items added later. `.gallery-tile` + `.gallery-caption` for picture tiles.
197
+ **Griddy** (items of different heights packed into columns): `<div class="griddy grid-cols-2 md:grid-cols-4 gap-3" data-moey-griddy>…items…</div>` (images need width/height); `span-2` wide items, `.griddy-dense` fills holes, `.griddy-glide` makes items glide when the layout changes, add `data-moey-sortable` to rearrange. `data-moey-enter="pop|rise|drop|fade|zoom|slide|flip|blur|none"` (any list or grid) animates items added later, `data-moey-enter-first` the first page too, `Moey.enter(list)` replays. `.gallery-tile` + `.gallery-caption` for picture tiles. (Old names `.masonry` / `data-moey-masonry` still work; use griddy.)
198
198
 
199
199
  **Filter & sort**: buttons in `<div data-moey-filters="#items">` with `data-moey-filter="tag"` (`"*"` = all) and `data-moey-sort-by="date"` (+ `data-moey-sort-dir="desc"`); items carry `data-tags="a b"` and `data-date`…; `data-moey-filter-search="#items"`, `data-moey-filter-count="#items"`, a `.filter-empty` inside.
200
200
 
201
201
  **Infinite scroll**: `data-moey-infinite` on the list; `moey:load` → append items inside `e.detail.waitUntil(promise)`, call `e.detail.done()` on the last page. A "Load more" button takes over after 3 loads.
202
202
 
203
- **Lightbox**: `data-moey-lightbox` on a gallery: `<a href="big.jpg" data-caption="…"><img src="small.jpg" alt="…"></a>` — also video (.mp4), audio (.mp3), YouTube/Vimeo links, `data-type="iframe"` pages/PDFs, `href="#template-id"` HTML. Parts: `data-moey-lightbox-thumbs="auto|always|never"`, `-counter`, `-caption`, `-zoom`, `-loop`, `-download`, `-share`, `-fullscreen`, `-slideshow="4000"` ("false" turns off). `data-moey-lightbox="name"` groups links across the page. `Moey.lightbox.open([...], options)`.
203
+ **Lightbox**: `data-moey-lightbox` on a gallery: `<a href="big.jpg" data-caption="…"><img src="small.jpg" alt="…"></a>` — also video (.mp4), audio (.mp3), a video site's embed address with `data-type="embed"`, `data-type="iframe"` pages/PDFs, `href="#template-id"` HTML. Parts: `data-moey-lightbox-thumbs="auto|always|never"`, `-counter`, `-caption`, `-zoom`, `-loop`, `-download`, `-share`, `-fullscreen`, `-slideshow="4000"` ("false" turns off). `data-moey-lightbox="name"` groups links across the page. `Moey.lightbox.open([...], options)`.
204
204
 
205
- **Audio & video**: `<div class="player" data-moey-player><video src="…" poster="…"></video></div>` (or `<audio>`, with `.player-head` > `.player-cover` + `.player-title`); `data-moey-controls="speed volume captions pip fullscreen"` or `"none"`. A file that can't play shows a message + Try again by itself (`data-moey-error-text`, event `moey:player-error`). Embeds that load on click: `<a class="embed" href="https://www.youtube.com/watch?v=…" data-moey-embed><img src="cover.jpg" alt=""><span class="embed-play"></span><span class="embed-title">…</span></a>` (`.embed-9x16` for Shorts). Never paste a raw YouTube iframe.
205
+ **Audio & video**: `<div class="player" data-moey-player><video src="…" poster="…"></video></div>` (or `<audio>`, with `.player-head` > `.player-cover` + `.player-title`); `data-moey-controls="speed volume captions pip fullscreen"` or `"none"`. A file that can't play shows a message + Try again by itself (`data-moey-error-text`, event `moey:player-error`). Embeds that load on click: `<a class="embed" href="the video page" data-src="the site's embed address" data-moey-embed><img src="cover.jpg" alt=""><span class="embed-play"></span><span class="embed-title">…</span></a>` (`data-src` is loaded exactly as given; `.embed-9x16` for vertical clips). Never paste a raw video-site iframe into a page.
206
206
 
207
207
  **Marquee** (logos, testimonials, tickers): `<div class="marquee" data-moey-marquee aria-label="…"><ul class="marquee-group"><li>…</li></ul></div>` — `data-moey-speed`, `.marquee-reverse`, `.marquee-vertical` (with a height). It pauses on hover/focus and has a pause button; don't remove it without another way to stop it.
208
208
 
@@ -229,7 +229,7 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
229
229
 
230
230
  ## JavaScript API (only when needed)
231
231
 
232
- `Moey.toast()` · `Moey.confirm() / alert() / prompt()` · `Moey.open(el) / close(el)` · `Moey.tab()` · `Moey.tags()` · `Moey.chips()` · `Moey.toggle()` · `Moey.datatable()` · `Moey.select()` · `Moey.datepicker()` · `Moey.combobox()` · `Moey.palette()` · `Moey.notify()` · `Moey.clean(form)` · `Moey.chart()` · `Moey.kanban()` · `Moey.split()` · `Moey.calendar()` · `Moey.swipe()` · `Moey.refresh()` · `Moey.sortable()` · `Moey.timepicker()` · `Moey.chat()` · `Moey.shortcuts` · `Moey.tour()` · `Moey.marquee()` · `Moey.masonry()` · `Moey.filter()` · `Moey.infinite()` · `Moey.lightbox` · `Moey.player()`. Events are `moey:*` (e.g. `moey:select`, `moey:change`, `moey:open`, `moey:close`).
232
+ `Moey.toast()` · `Moey.confirm() / alert() / prompt()` · `Moey.open(el) / close(el)` · `Moey.tab()` · `Moey.tags()` · `Moey.chips()` · `Moey.toggle()` · `Moey.datatable()` · `Moey.select()` · `Moey.datepicker()` · `Moey.combobox()` · `Moey.palette()` · `Moey.notify()` · `Moey.clean(form)` · `Moey.chart()` · `Moey.kanban()` · `Moey.split()` · `Moey.calendar()` · `Moey.swipe()` · `Moey.refresh()` · `Moey.sortable()` · `Moey.timepicker()` · `Moey.chat()` · `Moey.shortcuts` · `Moey.tour()` · `Moey.marquee()` · `Moey.griddy()` · `Moey.enter()` · `Moey.filter()` · `Moey.infinite()` · `Moey.lightbox` · `Moey.player()`. Events are `moey:*` (e.g. `moey:select`, `moey:change`, `moey:open`, `moey:close`).
233
233
 
234
234
  ## Common mistakes to avoid
235
235
 
@@ -244,13 +244,13 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
244
244
 
245
245
  ---
246
246
 
247
- # Moey documentation (v0.2.0)
247
+ # Moey documentation (v0.3.0)
248
248
 
249
249
  Every page of the docs, in order.
250
250
 
251
251
  # Overview (Getting started)
252
252
 
253
- v0.2.0 · MIT · no dependencies
253
+ v0.3.0 · MIT · no dependencies
254
254
  Apps that feel native on every screen.
255
255
 
256
256
  Moey is a clean, mobile-first front-end framework for admin dashboards, productivity apps and websites. Plain HTML, one stylesheet and one script — flat, accessible, light and dark, right to left.
@@ -304,7 +304,7 @@ Not just buttons and cards: the pieces productivity apps are made of, each worki
304
304
  Swipe actionsSwipe a row to archive or delete — like mail apps
305
305
  Pull to refreshPull down at the top of a list to load what's new
306
306
  SortableDrag anything into the order you want
307
- MasonryPictures and cards of every height, packed tight
307
+ GriddyPictures and cards of every height, packed tight
308
308
  LightboxSwipe, pinch and zoom through pictures, video and more
309
309
  Audio & videoA player in your colors; embeds that load on demand
310
310
  Keyboard shortcutsShortcuts on any button, and a "?" sheet to find them
@@ -317,9 +317,9 @@ Not just buttons and cards: the pieces productivity apps are made of, each worki
317
317
  ## Overview
318
318
 
319
319
  ```html
320
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.css">
320
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.css">
321
321
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
322
- <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.js" defer></script>
322
+ <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.js" defer></script>
323
323
  ```
324
324
 
325
325
  ### Cascade layers
@@ -406,9 +406,9 @@ Moey is one stylesheet and one script, with no dependencies and no build step. L
406
406
  Link the files straight from jsDelivr (the version in the address never changes, so it can be cached for a year):
407
407
 
408
408
  ```html
409
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.css">
409
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.css">
410
410
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
411
- <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.js" defer></script>
411
+ <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.js" defer></script>
412
412
  ```
413
413
 
414
414
  ### npm
@@ -440,9 +440,9 @@ The `viewport` line matters: it makes the page fit a phone. The small script bef
440
440
  <meta name="viewport" content="width=device-width, initial-scale=1">
441
441
  <title>My app</title>
442
442
  <script>try { const t = localStorage.getItem('moey-theme'); if (t) document.documentElement.dataset.moTheme = t; } catch {}</script>
443
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.css">
443
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.css">
444
444
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
445
- <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.2.0/dist/moey.min.js" defer></script>
445
+ <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.js" defer></script>
446
446
  </head>
447
447
  <body>
448
448
  <main class="container py-8">
@@ -469,7 +469,7 @@ The `viewport` line matters: it makes the page fit a phone. The small script bef
469
469
 
470
470
  ## Changelog
471
471
 
472
- What changed in each version of Moey. A link with a version in it (`moey-ui@0.1.0`) always serves exactly that version, so your pages never change until you change the link.
472
+ What changed in each version of Moey. A link with a version in it (`moey-ui@0.3.0`) always serves exactly that version, so your pages never change until you change the link.
473
473
 
474
474
  {{changelog}}
475
475
 
@@ -1615,16 +1615,24 @@ Stat tiles on top, a wide chart and a side list below — one grid.
1615
1615
  </div>
1616
1616
  ```
1617
1617
 
1618
+ ### Items of different heights: Griddy
1619
+
1620
+ In a normal grid every row is as tall as its tallest item, so shorter cards leave holes under them. Add `.griddy` and `data-moey-griddy` to a grid and its items pack into columns instead, like a pin board, with the same `grid-cols-*` and `gap-*` utilities. New items can arrive with an animation, and items glide when the layout changes. All about Griddy.
1621
+
1622
+ ```html
1623
+ <div class="griddy grid-cols-2 md:grid-cols-3 gap-3" data-moey-griddy>…</div>
1624
+ ```
1625
+
1618
1626
  ---
1619
1627
 
1620
- # Masonry (Layout)
1628
+ # Griddy (Layout)
1621
1629
 
1622
- ## Masonry
1630
+ ## Griddy
1623
1631
 
1624
- Items of different heights packed into columns with no holes — photo galleries, pin boards, cards of notes and reviews. Columns come from the grid utilities you already know, the order stays the reading order, and it re-packs as images load and screens change.
1632
+ A CSS grid whose items of different heights pack into columns with no holes: photo galleries, pin boards, cards of notes and reviews. Columns come from the grid utilities you already know, the order stays the reading order, and it packs again as pictures load and screens change. New items can arrive with an animation, and items glide to their new place when the layout changes.
1625
1633
 
1626
1634
  ```html
1627
- <div class="masonry grid-cols-2 md:grid-cols-3 gap-3" data-moey-masonry>
1635
+ <div class="griddy grid-cols-2 md:grid-cols-3 gap-3" data-moey-griddy>
1628
1636
  <a class="gallery-tile" href="lisbon.jpg"><img src="lisbon-small.jpg" alt="Lisbon at dawn" width="800" height="1000"></a>
1629
1637
  <a class="gallery-tile" href="lake.jpg"><img src="lake-small.jpg" alt="A lake up north" width="800" height="560"></a>
1630
1638
  …
@@ -1633,59 +1641,85 @@ Items of different heights packed into columns with no holes — photo galleries
1633
1641
 
1634
1642
  ### How it works
1635
1643
 
1636
- - **A grid with columns:** `.masonry` plus the column utilities — `grid-cols-2 md:grid-cols-3`. Without them it makes as many columns of about 14rem as fit (`--mo-masonry-min`).
1644
+ - **A grid with columns:** `.griddy` plus the column utilities, `grid-cols-2 md:grid-cols-3`. Without them it makes as many columns of about 14rem as fit (`--mo-griddy-min`).
1637
1645
 
1638
- - **Any items:** pictures, cards, notes. Give images their `width` and `height` so the space is kept before they load.
1646
+ - **Any items:** pictures, cards, notes. Give pictures their `width` and `height` so the space is kept before they load.
1639
1647
 
1640
- - **Moey packs them:** each item goes to the column that is shortest so far, at its exact height, so the columns fill with no holes. It packs again when an image loads, the window changes or items come and go, and it measures each item's real size, so zoom or an entrance animation never makes items overlap.
1648
+ - **Moey packs them:** each item goes to the column that is shortest so far, at its exact height, so the columns fill with no holes. It packs again when a picture loads, fonts arrive, the window changes, items come and go, or a class changes the columns, the gap or an item's width. It measures each item's real size, so zoom or an entrance animation never makes items overlap.
1641
1649
 
1642
1650
  - **Reading order stays:** items stay in the page's order, roughly left to right, so the keyboard and screen readers go through them sensibly. In browsers with built-in CSS masonry, Moey just uses that.
1643
1651
 
1644
1652
  ### Cards, not just pictures
1645
1653
 
1646
1654
  ```html
1647
- <div class="masonry gap-4" data-moey-masonry>
1655
+ <div class="griddy gap-4" data-moey-griddy>
1648
1656
  <div class="card">…</div>
1649
1657
  <div class="card">…</div>
1650
1658
  </div>
1651
1659
  ```
1652
1660
 
1653
- ### Wide items, holes filled, drag to arrange
1661
+ ### New items arrive
1654
1662
 
1655
- `span-2` makes an item two columns wide; `.masonry-dense` lets later items move up into the holes this leaves (like a packing puzzle). Add data-moey-sortable and people can drag the tiles into their own order. Try it:
1663
+ Add `data-moey-enter` and items added later (infinite scroll, "Load more", a post added by any script) play an entrance, one after another. Pick the effect with its value. Items that only move (sorting, dragging, filters) don't play it, and nothing moves for visitors who turned motion off. Try them:
1656
1664
 
1657
1665
  ```html
1658
- <div class="masonry masonry-dense grid-cols-2 md:grid-cols-4 gap-3" data-moey-masonry data-moey-sortable>
1659
- <figure class="gallery-tile span-2" data-id="lisbon">…</figure>
1660
- <figure class="gallery-tile" data-id="lake">…</figure>
1661
- …
1662
- </div>
1666
+ <div class="griddy gap-3" data-moey-griddy data-moey-enter="pop">…</div>
1667
+
1668
+ <!-- effects: (empty) fade up · fade · rise · drop · zoom · pop · slide · flip · blur · none -->
1669
+ <!-- data-moey-enter-first: the items already there when the page loads arrive too -->
1670
+ <!-- your own: [data-moey-enter] > .is-entering { animation: … } (--mo-enter-index: 0, 1, 2… for the stagger) -->
1671
+
1672
+ <script>
1673
+ Moey.enter(list); // play it again on every item
1674
+ Moey.enter(list, [a, b]); // or on the ones you give
1675
+ </script>
1663
1676
  ```
1664
1677
 
1665
- With `.masonry-dense` the order on screen can differ from the page's — fine for pictures, but keep it off when the order matters (news, steps).
1678
+ It works on any list or grid, not only Griddy: a feed, a list group, a row of cards. The items wait `--mo-enter-stagger` (60ms, 55ms for `pop`) one after another.
1666
1679
 
1667
- ### New items glide in
1680
+ ### Gliding
1668
1681
 
1669
- Add `data-moey-enter` and items added later (infinite scroll, "Load more", a new post) fade up into place, one after another. Items that only move (sorting, dragging, filters) don't. It works on any list or grid, not only masonry, and nothing moves for visitors who turned motion off.
1682
+ Add `.griddy-glide` and the items already on the page slide to their new place when the layout changes: an item gets wider, the column count or the gap changes, the window is resized, a filter hides some. An item placed for the first time goes straight to its spot, so new items never fly in from a corner. Try it:
1670
1683
 
1671
1684
  ```html
1672
- <div class="masonry gap-3" data-moey-masonry data-moey-enter>…</div>
1685
+ <div class="griddy griddy-glide grid-cols-3 gap-3" data-moey-griddy>…</div>
1686
+
1687
+ <script>
1688
+ item.classList.add('span-2'); // the others glide out of the way
1689
+ grid.classList.replace('grid-cols-3', 'grid-cols-4'); // a new column count: everything glides
1690
+ </script>
1691
+ ```
1692
+
1693
+ ### Wide items, holes filled, drag to arrange
1673
1694
 
1674
- <!-- data-moey-enter="fade": fade only · ="zoom": grow from 96% -->
1675
- <!-- your own: [data-moey-enter] > .is-entering { animation: … } (--mo-enter-index: 0, 1, 2… for a stagger) -->
1695
+ `span-2` makes an item two columns wide; `.griddy-dense` lets later items move up into the holes this leaves (like a packing puzzle). Add data-moey-sortable and people can drag the tiles into their own order. Try it:
1696
+
1697
+ ```html
1698
+ <div class="griddy griddy-dense grid-cols-2 md:grid-cols-4 gap-3" data-moey-griddy data-moey-sortable>
1699
+ <figure class="gallery-tile span-2" data-id="lisbon">…</figure>
1700
+ <figure class="gallery-tile" data-id="lake">…</figure>
1701
+ …
1702
+ </div>
1676
1703
  ```
1677
1704
 
1705
+ With `.griddy-dense` the order on screen can differ from the page's. That's fine for pictures, but keep it off when the order matters (news, steps).
1706
+
1678
1707
  ### Reference
1679
1708
 
1680
1709
  | Class / attribute | What it does |
1681
1710
  | --- | --- |
1682
- | `.masonry[data-moey-masonry]` | Packs its items into columns with no holes |
1683
- | `grid-cols-*` · `md:grid-cols-*` · `gap-*` | Columns and spacing (else automatic: `--mo-masonry-min`, 14rem) |
1711
+ | `.griddy[data-moey-griddy]` | Packs its items into columns with no holes |
1712
+ | `grid-cols-*` · `md:grid-cols-*` · `gap-*` | Columns and spacing (else automatic: `--mo-griddy-min`, 14rem) |
1684
1713
  | `span-2` · `span-3` | An item across two or three columns |
1685
- | `.masonry-dense` | Later items fill holes (order on screen may change) |
1686
- | `data-moey-enter` · `="fade"` · `="zoom"` | Items added later animate in (any list or grid); they get `.is-entering` and `--mo-enter-index` while they do |
1714
+ | `.griddy-dense` | Later items fill holes (order on screen may change) |
1715
+ | `.griddy-glide` | Items already there glide to their new place when the layout changes (.4s) |
1716
+ | `data-moey-enter="…"` | Items added later arrive, one after another: (empty) fade up · `fade` · `rise` · `drop` · `zoom` · `pop` · `slide` · `flip` · `blur` · `none`. Any list or grid. While they do, they get `.is-entering` and `--mo-enter-index` |
1717
+ | `data-moey-enter-first` | The items already there when the page loads arrive too |
1718
+ | `--mo-enter-stagger` | The wait between items (60ms; 55ms for `pop`) |
1687
1719
  | `.gallery-tile` + `.gallery-caption` / `figcaption` | A rounded picture tile with a caption on hover (always shown on touch) |
1688
- | `Moey.masonry(el).layout()` | Pack again (after changing items from code — usually automatic) |
1720
+ | `Moey.griddy(el).layout()` | Pack again (after changing items from code; usually automatic) |
1721
+ | `Moey.enter(list, items?)` | Play the arrival again, on all items or the ones given |
1722
+ | `.masonry` · `.masonry-dense` · `data-moey-masonry` · `Moey.masonry()` | Griddy's earlier names: they still work |
1689
1723
 
1690
1724
  ---
1691
1725
 
@@ -1772,7 +1806,7 @@ Add `.is-collapsed` to `.app` for an icon-only sidebar on desktop. Labels, badge
1772
1806
  | `--mo-sidebar-width-collapsed` | 4.25rem |
1773
1807
  | `--mo-sidebar-bg` | `var(--mo-bg-surface)` |
1774
1808
  | `--mo-topbar-height` | 3.75rem |
1775
- | `--mo-topbar-bg` | page color, slightly see-through |
1809
+ | `--mo-topbar-bg` | the page color, shown slightly see-through (`--mo-glass`); `<header class="app-topbar frosted">` for frosted glass |
1776
1810
  | `--mo-app-padding` | 1rem → 1.5rem (md) → 2rem (2xl) |
1777
1811
 
1778
1812
  The active link uses the current theme, so `` recolors it.
@@ -2225,7 +2259,7 @@ Screenshots and diagrams often need a light and a dark version. Put both in and
2225
2259
 
2226
2260
  ## Audio & video
2227
2261
 
2228
- A player that looks like the rest of your app, for video, music, podcasts and voice notes — big touch targets, the keys people know from video sites, and nothing lost without JavaScript (the browser's own controls stay). Plus embeds — YouTube, Vimeo, maps — that load only when someone presses play.
2262
+ A player that looks like the rest of your app, for video, music, podcasts and voice notes — big touch targets, the keys people know from video sites, and nothing lost without JavaScript (the browser's own controls stay). Plus embeds from any video site, maps or pages that load only when someone presses play.
2229
2263
 
2230
2264
  ### Video
2231
2265
 
@@ -2301,21 +2335,21 @@ The same player, small, inside a chat bubble — only the speed button (`data-mo
2301
2335
 
2302
2336
  ### Embeds that load on demand
2303
2337
 
2304
- An `` shows a light cover with a play button. Only when it's pressed does the real player load — so pages stay fast, and nothing from YouTube or Vimeo reaches the visitor until they choose (YouTube's no-cookie player, Vimeo's do-not-track). Without JavaScript it's a plain link to the video.
2338
+ An `` shows a light cover with a play button. Only when it's pressed does the real player load, so pages stay fast and nothing from the other site reaches the visitor until they choose. It works with any video site, map or page: put the site's embed address (usually under Share → Embed) in `data-src`, and the normal page in `href` for visitors without JavaScript. Moey loads the embed address exactly as given, so add the site's own options there, such as autoplay (they pressed play already) or a privacy-friendly mode.
2305
2339
 
2306
2340
  ```html
2307
- <a class="embed max-w-2xl" href="https://www.youtube.com/watch?v=aqz-KE-bpKQ" data-moey-embed>
2341
+ <a class="embed max-w-2xl" href="https://video.example.com/watch/…" data-src="https://player.example.com/embed/…?autoplay=1" data-moey-embed>
2308
2342
  <img src="img/gallery/harbor-night.svg" alt="">
2309
2343
  <span class="embed-play"></span>
2310
- <span class="embed-title">Big Buck Bunny — a short film</span>
2311
- <span class="embed-note">Plays from YouTube</span>
2344
+ <span class="embed-title">A short film</span>
2345
+ <span class="embed-note">Plays from the video site</span>
2312
2346
  </a>
2313
2347
  ```
2314
2348
 
2315
- Shapes: 16:9 (default), `.embed-4x3`, `.embed-1x1`, `.embed-9x16` for Shorts and Reels:
2349
+ Shapes: 16:9 (default), `.embed-4x3`, `.embed-1x1`, `.embed-9x16` for vertical clips:
2316
2350
 
2317
2351
  ```html
2318
- <a class="embed embed-9x16" href="https://www.youtube.com/shorts/aqz-KE-bpKQ" data-moey-embed>
2352
+ <a class="embed embed-9x16" href="https://video.example.com/watch/…" data-src="https://player.example.com/embed/…" data-moey-embed>
2319
2353
  <img src="img/gallery/festival.svg" alt="">
2320
2354
  <span class="embed-play"></span>
2321
2355
  <span class="embed-title">A vertical clip</span>
@@ -2329,7 +2363,7 @@ Shapes: 16:9 (default), `.embed-4x3`, `.embed-1x1`, `.embed-9x16` for Shorts and
2329
2363
  </a>
2330
2364
  ```
2331
2365
 
2332
- Want them in a full-screen viewer instead? Links to videos, audio and YouTube work in the Lightbox too.
2366
+ Want them in a full-screen viewer instead? Videos, audio and embed addresses work in the Lightbox too.
2333
2367
 
2334
2368
  ### Reference
2335
2369
 
@@ -2339,7 +2373,7 @@ Want them in a full-screen viewer instead? Links to videos, audio and YouTube wo
2339
2373
  | `data-moey-controls="speed volume captions pip fullscreen"` · `"none"` | Which buttons (play, seek and time always) |
2340
2374
  | `data-moey-speeds="1,1.5,2"` | The speeds the speed button goes through |
2341
2375
  | `.player-head` · `.player-cover` · `.player-title` · `.player-sub` | Audio: a cover and titles above the bar |
2342
- | `a.embed[data-moey-embed]` (+ `data-src`, `data-title`) | A cover that becomes the player when pressed (YouTube, Vimeo, any page) |
2376
+ | `a.embed[data-moey-embed]` (+ `data-src`, `data-title`) | A cover that becomes the player when pressed: `data-src` (else `href`) is loaded exactly as given (any video site, a map, any page) |
2343
2377
  | `.embed-play` · `.embed-title` · `.embed-note` · `.embed-4x3\|1x1\|9x16` | The cover's parts · shapes |
2344
2378
  | `.is-error` · event `moey:player-error` · `data-moey-error-text` | The file can't be loaded or played: the bar says so ("Can't play this file", or your text) with a **Try again** button; screen readers hear it |
2345
2379
  | `Moey.player(el)` · event `moey:embed` | `{ media, play(), pause() }` · an embed was loaded |
@@ -3966,9 +4000,9 @@ Tapping the field opens the list as a bottom sheet (no keyboard needed); drag it
3966
4000
  <textarea class="form-control" id="body" name="description" data-mob placeholder="Tell people about this product…"></textarea>
3967
4001
  </div>
3968
4002
  ``` ### Set it up, step by step **Load Mob next to Moey.** It is its own small package (no dependencies, about 20 KB gzipped), so pages without an editor don't pay for it. From a CDN: ```html
3969
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.1.0/dist/moey.min.css">
4003
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.css">
3970
4004
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mobtexteditor@1/mob.css">
3971
- <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.1.0/dist/moey.min.js" defer></script>
4005
+ <script src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.js" defer></script>
3972
4006
  <script src="https://cdn.jsdelivr.net/npm/mobtexteditor@1/mob.js" defer></script>
3973
4007
  ``` or with npm: `npm install mobtexteditor` and `import 'mobtexteditor/mob.css'; import Mob from 'mobtexteditor';`
3974
4008
 
@@ -7100,7 +7134,7 @@ A sample page at phone width — tap ☰ to open the menu.
7100
7134
  | --- | --- |
7101
7135
  | (default) | A flat surface |
7102
7136
  | `.navbar-transparent` | No background — over a hero image or colored header |
7103
- | `.navbar-blur` | Frosted glass: see-through with a blur (great with sticky) |
7137
+ | `.navbar-blur` | Frosted glass: see-through with a blur (great with sticky). For other bars: `.frosted` |
7104
7138
  | `.navbar-floating` | An inset, rounded bar |
7105
7139
  | `.navbar-vivid` · `.navbar-deep` + `.navbar-<color>` | Filled with the color (*-600, or a dark *-800); links and ghost buttons turn light. Give buttons their own `theme-*` if needed. |
7106
7140
  | `.navbar-sticky` | Stays at the top; gets a soft shadow once the page scrolls |
@@ -7278,6 +7312,7 @@ Phones get the tab bar, wide screens the sidebar — the same sections in both.
7278
7312
  | `.tabbar-badge` | A count, or a dot when empty |
7279
7313
  | `.tabbar-action` | The big round middle button (its label is visually hidden) |
7280
7314
  | `.tabbar-floating` · `.tabbar-always` | A rounded floating pill · stays on wide screens too |
7315
+ | `.frosted` | Frosted glass: more see-through, with the page blurred behind (by default the bar is only slightly see-through, which is lighter to scroll) |
7281
7316
  | `data-moey-hide-on-scroll` | Slides away while scrolling down |
7282
7317
  | `data-moey-no-current` | On a tab: tapping it doesn't move the mark (it opens something) |
7283
7318
  | `--mo-tabbar-space` | Read-only: the room the bar takes (the page and toasts use it; 0 when there's no bar) |
@@ -9866,7 +9901,7 @@ Tab to an item (or its handle), Space picks it up, ↑ ↓ move it (← → in a
9866
9901
 
9867
9902
  ## Filter & sort
9868
9903
 
9869
- Buttons that show only what matches — "Nature", "City" — a search box, and sorting, for any set of items: a gallery, product cards, a team page. Items glide to their new places, a count keeps track, and it works with masonry.
9904
+ Buttons that show only what matches — "Nature", "City" — a search box, and sorting, for any set of items: a gallery, product cards, a team page. Items glide to their new places, a count keeps track, and it works with Griddy.
9870
9905
 
9871
9906
  ```html
9872
9907
  <!-- the controls point at the items with a selector -->
@@ -9879,7 +9914,7 @@ Buttons that show only what matches — "Nature", "City" — a search box, and s
9879
9914
  <span data-moey-filter-count="#gallery"></span> photos
9880
9915
 
9881
9916
  <!-- the items carry their tags and the values to sort by -->
9882
- <div class="masonry" id="gallery" data-moey-masonry>
9917
+ <div class="griddy" id="gallery" data-moey-griddy>
9883
9918
  <a class="gallery-tile" href="lake.jpg" data-tags="nature cool" data-date="2026-03-14" data-name="lake">…</a>
9884
9919
  …
9885
9920
  <p class="filter-empty" hidden>No photos match.</p>
@@ -9922,7 +9957,7 @@ gallery.addEventListener('moey:filter', (e) => console.log(e.detail.shown, 'of',
9922
9957
  The next items load as you reach the end of the list — feeds, galleries, search results. After a few loads it waits for a "Load more" button, so people can still get to your footer; it says when it's loading and when there's nothing more.
9923
9958
 
9924
9959
  ```html
9925
- <div class="masonry" id="feed" data-moey-masonry data-moey-infinite data-moey-enter>
9960
+ <div class="griddy" id="feed" data-moey-griddy data-moey-infinite data-moey-enter>
9926
9961
  …the first items…
9927
9962
  </div>
9928
9963
 
@@ -9943,19 +9978,29 @@ The next items load as you reach the end of the list — feeds, galleries, searc
9943
9978
 
9944
9979
  - **Load in `moey:load`:** fetch the next page, append the items, and hand the promise to `e.detail.waitUntil()` so the spinner shows while it loads.
9945
9980
 
9946
- - **Say when it's over:** call `e.detail.done()` on the last page — "That's everything" appears (`data-moey-infinite-end` to change the words).
9981
+ - **Say when it's over:** call `e.detail.done()` on the last page: "That's everything" appears (`data-moey-infinite-end` to change the words).
9982
+
9983
+ - **Choose how far it goes alone:** after `data-moey-infinite-auto` loads (3) a "Load more" button takes over, so people can still reach your footer. A click makes it automatic again for the same number of loads. `data-moey-infinite-auto="all"` never stops; `data-moey-infinite="button"` always uses the button.
9947
9984
 
9948
- - **Choose how far it goes alone:** after `data-moey-infinite-auto` loads (3) a "Load more" button takes over; `data-moey-infinite="button"` always uses the button.
9985
+ ### A button first, then automatic
9986
+
9987
+ `data-moey-infinite="once"` starts with the "Load more" button, so nothing loads until someone asks. After the first click it loads by itself as they scroll (up to `data-moey-infinite-auto` loads, then the button again). While it loads, the button stays where it is, with a spinner and "Loading…" inside it, so nothing on the page jumps. Try it:
9988
+
9989
+ ```html
9990
+ <div class="griddy" id="feed" data-moey-griddy data-moey-infinite="once" data-moey-enter="pop">
9991
+ …the first items…
9992
+ </div>
9993
+ ```
9949
9994
 
9950
9995
  ### Good to know
9951
9996
 
9952
9997
  - It loads a little before the end (400px early), so scrolling rarely has to wait.
9953
9998
 
9954
- - It works with masonry, filters, list groups and cards; new items join the layout and the current filter.
9999
+ - It works with griddy, filters, list groups and cards; new items join the layout and the current filter.
9955
10000
 
9956
10001
  - Add `data-moey-enter` and the new items fade up into place, one after another (more).
9957
10002
 
9958
- - Screen readers hear "Loading…", "8 more loaded" and "That's everything".
10003
+ - Screen readers hear "Loading…", "8 more loaded" and "That's everything". When the button goes away after a click, keyboard focus moves to the first new item.
9959
10004
 
9960
10005
  - Keep links to items working: give the items real URLs so people can come back to them.
9961
10006
 
@@ -9963,8 +10008,9 @@ The next items load as you reach the end of the list — feeds, galleries, searc
9963
10008
 
9964
10009
  | Attribute / API | What it does |
9965
10010
  | --- | --- |
9966
- | `data-moey-infinite` · `="button"` | Loads more near the end · only with the button |
9967
- | `data-moey-infinite-auto="3"` · `data-moey-infinite-end` | Loads before the button takes over · the words at the end |
10011
+ | `data-moey-infinite` · `="button"` · `="once"` | Loads more near the end · only with the button · the button first, then automatic |
10012
+ | `data-moey-infinite-auto="3"` · `="all"` | Automatic loads before the button takes over · never stop |
10013
+ | `data-moey-infinite-more` · `data-moey-infinite-end` | The button's words ("Load more") · the words at the end |
9968
10014
  | Event `moey:load` | `detail: { page, waitUntil(promise), done() }` |
9969
10015
  | `Moey.infinite(el)` | `{ load(), reset() }` (reset after a new search) |
9970
10016
 
@@ -9974,7 +10020,7 @@ The next items load as you reach the end of the list — feeds, galleries, searc
9974
10020
 
9975
10021
  ## Lightbox
9976
10022
 
9977
- A full-screen viewer for pictures, video, audio, YouTube, Vimeo, pages and any HTML — made for fingers first: the picture follows your finger to the next one, swipe down to close, pinch or double-tap to zoom, one tap to hide everything but the picture. On a computer: arrows, thumbnails, the mouse wheel and the keyboard. Every part can be switched on or off.
10023
+ A full-screen viewer for pictures, video, audio, embedded players from any video site, pages and any HTML — made for fingers first: the picture follows your finger to the next one, swipe down to close, pinch or double-tap to zoom, one tap to hide everything but the picture. On a computer: arrows, thumbnails, the mouse wheel and the keyboard. Every part can be switched on or off.
9978
10024
 
9979
10025
  ```html
9980
10026
  <div class="grid grid-cols-3 md:grid-cols-4 gap-2" data-moey-lightbox>
@@ -10007,14 +10053,14 @@ A full-screen viewer for pictures, video, audio, YouTube, Vimeo, pages and any H
10007
10053
 
10008
10054
  ### Not just pictures
10009
10055
 
10010
- The type comes from the address (`.mp4` → video, `.mp3` → audio, a YouTube or Vimeo link → that player, `.pdf` → a page) or from `data-type`. Videos and embeds load only when shown, and stop when you move on or close. YouTube uses its privacy-friendly no-cookie player.
10056
+ The type comes from the file (`.mp4` → video, `.mp3` → audio, `.pdf` → a page) or from `data-type`. For a video on a video site, use the site's **embed address** (usually under Share → Embed) with `data-type="embed"`: Moey loads it exactly as given, so you choose the site and its privacy options. Videos and embeds load only when shown, and stop when you move on or close.
10011
10057
 
10012
10058
  ```html
10013
10059
  <div data-moey-lightbox>
10014
10060
  <a href="photo.jpg"><img src="photo-small.jpg" alt="…"></a>
10015
10061
  <a href="clip.mp4" data-poster="clip-cover.jpg">Video</a> <!-- video -->
10016
10062
  <a href="episode-12.mp3" data-poster="cover.jpg">Listen</a> <!-- audio, with cover art -->
10017
- <a href="https://www.youtube.com/watch?v=…">Watch on YouTube</a> <!-- youtube / vimeo -->
10063
+ <a href="https://player.example.com/embed/…" data-type="embed">Watch</a> <!-- a video site's embed address -->
10018
10064
  <a href="#size-guide">Size guide</a> <!-- HTML from a <template> or element -->
10019
10065
  <a href="menu.pdf" data-type="iframe">Menu (PDF)</a> <!-- a page, a PDF, a map -->
10020
10066
  </div>
@@ -10088,7 +10134,7 @@ gallery.addEventListener('moey:lightbox', (e) => {
10088
10134
  | --- | --- |
10089
10135
  | `data-moey-lightbox` (on a gallery or a link) · `="name"` | Links open in the viewer · links with the same name are one set |
10090
10136
  | `href` · `data-moey-lightbox-src` | What to show (the big version) |
10091
- | `data-type="image\|video\|audio\|youtube\|vimeo\|iframe\|inline"` | The kind (else guessed from the address) |
10137
+ | `data-type="image\|video\|audio\|embed\|iframe\|inline"` | The kind (else guessed from the file type). `embed`: a video player's embed address, in a 16:9 frame; `iframe`: a page, a PDF, a map |
10092
10138
  | `data-caption` · `data-poster` · `data-thumb` · `data-srcset` | Caption · video / audio cover · thumbnail · sharper sources for big screens |
10093
10139
  | `data-moey-lightbox-thumbs\|counter\|caption\|zoom\|loop\|fullscreen\|download\|share\|slideshow` | The parts (see above) |
10094
10140
  | `Moey.lightbox` | `open(items \| link, options)` · `close()` · `next()` · `prev()` · `go(i)` · `index` |
@@ -11450,6 +11496,37 @@ Press Tab to move through them. The ring shows for the keyboard only — a mouse
11450
11496
 
11451
11497
  ---
11452
11498
 
11499
+ # Frosted glass (Helpers)
11500
+
11501
+ ## Frosted glass
11502
+
11503
+ Bars that float over the page (the app header, the tab bar, sticky form buttons) are slightly see-through by default, with no blur, so scrolling stays light even on older phones. Add `.frosted` where you want the frosted-glass look: the page shows through, softly blurred.
11504
+
11505
+ ```html
11506
+ <nav class="tabbar frosted" aria-label="Main">…</nav>
11507
+ <header class="app-topbar frosted">…</header>
11508
+ <div class="form-actions form-actions-sticky frosted">…</div>
11509
+ ```
11510
+
11511
+ ### How it works
11512
+
11513
+ - **The setting:** `--mo-glass` is how solid those bars are, 97% by default. Set it on `:root` to change them all, for example `--mo-glass: 100%` for fully solid bars.
11514
+
11515
+ - **`.frosted`** lowers it to 78% and blurs the page behind. It works on any element with a background; for your own, use `color-mix(in oklab, your color var(--mo-glass), transparent)` so it follows the setting.
11516
+
11517
+ - **The navbar** has its own: `.navbar-blur`.
11518
+
11519
+ - **Why not by default:** the browser redraws a blur every time the page moves behind it. That's fine on a laptop but costs battery and smoothness on older phones, so it's your choice where it's worth it.
11520
+
11521
+ ### Reference
11522
+
11523
+ | Class / variable | What it does |
11524
+ | --- | --- |
11525
+ | `.frosted` | Frosted glass: more see-through (78%), with the page blurred behind |
11526
+ | `--mo-glass` | How solid floating bars are: 97% by default (app header, tab bar, sticky form buttons, chat day labels) |
11527
+
11528
+ ---
11529
+
11453
11530
  # Hover lift (Helpers)
11454
11531
 
11455
11532
  ## Hover lift