useAnnounce — Filter Result Count
- from @astryx
- by Astryx
A product filter that announces its result count with useAnnounce: once typing pauses for 500 ms, a screen reader hears "3 results" or "No results". The count has its own hasReplace instance, as the hook's docs advise for a changing value.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @astryx/example-use-announce-filter-result-countRegistry dependencies0
The CLI adds no other registry items with this one.
