Lists & Tables
Paginated data management with sparse loading, filtering, search, and dual view modes. Ported from @aina/helpers.
Core composable for paginated data management. Handles sparse page loading (only fetches visible pages), debounced search, filter state with URL sync, and dual view modes (table/cards). Feed it a fetchFn and it manages everything — pagination metadata, loading states, error handling, and chunk caching.
| Name | Status | CPU | RAM | Region | Earnings ($) | Uptime |
|---|---|---|---|---|---|---|
| No data | ||||||
useListData(options)
Creates a reactive paginated data manager.
Returns
itemsComputedRef — sparse array with placeholderspaginationRef — server pagination metadataloadPage(n)Load specific page into cachesetFilter(params)Apply filters, reset to page 1onSearchInput(q)Debounced search (300ms)viewModeRef<'table' | 'cards'> Universal list component supporting table and card layouts with infinite scroll. Responsive — desktop renders UTable, mobile renders card slots. Handles loading, error, and empty states. Works with useListData return value as the listData prop.
Initial loading state — shown when pagination === null and a fetch is pending. Override the default pulse skeleton via the #skeleton slot. This demo holds the fetch until you click Resolve.
When fetchFn throws on the first page, the error slot fires with { error, retry }. The retry handler calls listData.refresh() under the hood.
Fires when totalItems === 0 after the first successful fetch. Use the #empty slot for friendly zero-state messaging and a CTA to clear filters or create the first item.
Smart pagination controls with intelligent page range display. Shows first/last pages with ellipsis, window around current page, loading animations, and responsive layout (fixed bottom bar on mobile).
listData (UseListDataReturn), scroller (UseListScrollerReturn), maxVisible (default 7)