useCollator — Locale-aware Name Sort
- from @astryx
- by Astryx
A list of names sorted with the compare function from useCollator: accented and lowercase names land where a reader expects, and switching the provider locale to Swedish moves Å and Ö after Z.
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-collator-locale-aware-name-sortRegistry dependencies0
The CLI adds no other registry items with this one.
