Cache Badge
- from @localmode
- by LocalMode
Annotates a result as served from the semantic cache, optionally with the hit latency (e.g. "cached · 12ms"). Drive cached/latencyMs from a useSemanticCache lookup result. Renders nothing when cached is false, so it is safe to drop next to any result. Self-contained and presentational.
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 @localmode/ui/local-first/cache-badgeLive preview
No live preview has been built for this component yet.
Registry dependencies1
- @localmode/ui/lib/utils
