Async List Data
Live example
Async List Data
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/use-async-list.jsonAPI reference
These are the main Async List Data options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
load | async ({ signal, cursor, filterText, sortDescriptor }) => page | required |
getKey | (item: T) => string (required) | — |
Usage notes
The load callback receives filter, cursor and AbortSignal. Pass the signal to your request and return the next cursor only when more results exist. Use debounced SearchField.onSearch for filtering; preserve loading and error states.