Load-more control with pending and end-of-list states.
Design intent
Paginated lists without page numbers need one consistent load-more control that announces loading and the end of the list. LoadMore keeps the row layout and state copy in one place.
npx @slipstream-ui/cli@latest add load-moreProps
| Prop | Type | Default | Description |
|---|---|---|---|
| hasMore | boolean | required | Whether another page is available. |
| onLoadMore | () => void | required | Request the next page. |
| loading | boolean | false | Loading state. |
| loadLabel | string | 'Load more' | Button label. |
| loadingLabel | string | 'Loading...' | Loading label. |
| endLabel | string | 'You're all caught up.' | End-of-list message. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't keep the button when the list is complete
Replace the button with the end message so there is no dead action.
tsx<LoadMore hasMore={false} onLoadMore={load} />
Accessibility
- The wrapper uses aria-live polite and loading sets aria-busy.
- At the end, the button is replaced by a status message.
Composition
Compose with Grid: Place LoadMore below the card grid
<Grid>...</Grid><LoadMore ... />
Related components: Pagination, DataTable, DealCard, EntityCard
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.