Local List Data
Live example
Local List Data
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/use-list-data.jsonAPI reference
These are the main Local List Data options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
getKey | (item: T) => string (required) | — |
initialItems | readonly T[] | [] |
filter | (item, query) => boolean | — |
Usage notes
Use stable unique keys and immutable collection updates. Separate the visible search text from a debounced filter callback. Keep selection consistent when records are replaced or removed.