L
LocalMode

Capability Gate · LocalMode

A true gate: renders its children only when the device meets a stated requirement (e.g. requires="webgpu"), otherwise a themed fallback slot with guidance. The capability check uses useCapabilities. Local models have hard device requirements (LiteRT Gemma is WebGPU-only), so gating prevents a broken experience. The read-only display sibling is DeviceBadge.

npx shadcn@latest add https://localmode.ai/r/ui/local-first/capability-gate.json
Preview Capability Gate on LocalMode's site (opens in a new tab)
Loading the source for ui/local-first/capability-gate…

ui/local-first/capability-gate