Load more
ProThe end of a list loaded a page at a time: loads as the end comes near, with Load more, a loading state and Retry. Not an M3 component (@windmorph/react-pro).
import { LoadMore } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Props
LoadMore 11 props
Where the list is: more to load, loading, failed, or all loaded.
Loads by itself as the end comes near, with Load more as the keyboard and screen-reader fallback (a feed). Off, Load more waits for a press, so the content after the list (a footer) stays reachable by scrolling and the keyboard (WCAG 2.1.1, 2.4.3).
How near, as the observer's
rootMargin.What shows while loading, e.g. a skeleton of one item.
What shows once all is loaded.
The root, which holds focus while a page loads. Its other props (
id,aria-*,data-*) go to it too.
Text
Its words, for translation. A
LabelsProvidersets them for the whole app.The button that loads the next page.
The button that tries a failed page again.
Said when a page fails.
The default loading indicator's name.
Classes for the root; they win over the component's own (
cn()).Classes for each part.
Inline styles for the root, e.g.
--wm-load-more-*tokens.
Also accepts the root element's HTML attributes (id, data-*, event handlers).
Spec status
Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.
| Item | Status | Details |
|---|---|---|
| Load more button (manual) | Built | Configuration · List |
| Loading as you scroll (auto) | Built | Configuration · Auto |
| Status: idle, loading, error, done | Built | Variant · List, Auto |
| Retry after a failed page | Built | Use case · List |
| Custom loading and end content | Built | Configuration · Auto |
Theming & tokens
Set the tokens below on it or any ancestor. Style the parts with classNames (root, button, error).
| Variable | Default | Paints |
|---|---|---|
--wm-load-more-gap | 16px | Between what it shows (the message and Retry). |
--wm-load-more-padding-block | 8px | Above and below it. |
--wm-load-more-error-color | var(--md-sys-color-error) | The message when a page fails. |