# LocalMode UI blocks for shadcn/ui

> Local-first, offline AI UI primitives + blocks - run ML models (chat, RAG, vision, audio) entirely in the browser. No servers, no API keys.

LocalMode UI publishes 31 blocks for shadcn/ui, all of them free. In its own words: Local-first, offline AI UI primitives + blocks - run ML models (chat, RAG, vision, audio) entirely in the browser. No servers, no API keys. Its blocks cover chat and gallery.

Free blocks install with the shadcn CLI under the @localmode namespace, so the code lands in your project.

- Page, with live previews: https://shadcn.exchange/r/localmode
- Its own site: https://localmode.ai/?utm_source=shadcn.exchange
- 31 blocks, all free. Last changed 2026-10-13.
- Categories: Gallery (1), Chat (2)
- Search its blocks as JSON: `https://shadcn.exchange/api/catalog?kind=blocks&registry=localmode&q=<words>`

Each block's page answers in Markdown, source included, at its address with `.md` on the end. [The whole site for agents](https://shadcn.exchange/llms.txt).

## Free blocks

All 31 blocks, in the order its page shows them. Each installs with the command beside it, in a project that has shadcn/ui set up.

- [Chat Block](https://shadcn.exchange/r/localmode/ui/blocks/chat): The flagship on-device chat: a 76-model multi-provider selector (transformers, WebLLM, wllama GGUF, LiteRT) with capability gating, vision attachments, DeepSeek-R1 reasoning display, semantic response caching, agent mode with tools, custom… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/chat.json`
- [Research Agent Block](https://shadcn.exchange/r/localmode/ui/blocks/agents/research-agent): A tool-using ReAct research agent over its OWN on-device WebGPU-only WebLLM model (default Qwen3-1.7B-q4f16_1-MLC): three block-local tools (search over a bundled 8-article knowledge base, note, calculate), a step-by-step reasoning timelin… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/agents/research-agent.json`
- [Device Report Block](https://shadcn.exchange/r/localmode/ui/blocks/device/device-report): A zero-download device capability report rendered entirely from browser APIs (useCapabilities / useStorageQuota / useAdaptiveBatchSize): hardware cores/memory/GPU name, six feature flags (WebGPU/WASM/SIMD/Threads/IndexedDB/Workers), storag… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/device/device-report.json`
- [Live Transcription Block](https://shadcn.exchange/r/localmode/ui/blocks/audio/live-transcription): Open-mic streaming speech-to-text (useLiveTranscribe) with VAD-segmented utterances, plus a listen→plan→speak turn-taking assistant (useTurnTaker: Granite 4.0 350M plans, Kokoro speaks) selectable via a two-mode picker. VAD choice: the zer… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/audio/live-transcription.json`
- [Sentiment Analyzer Block](https://shadcn.exchange/r/localmode/ui/blocks/text-insights/sentiment-analyzer): Classify one text or thousands with DistilBERT SST-2 (one item per line, or a .txt/.csv first column) via useSequentialBatch — streaming results in input order with per-item error isolation, a cancel that keeps partial results, determinate… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/text-insights/sentiment-analyzer.json`
- [Data Extractor Block](https://shadcn.exchange/r/localmode/ui/blocks/agents/data-extractor): Schema-validated structured-data extraction from free text over its OWN on-device WebGPU-only WebLLM model (default Qwen3-1.7B-q4f16_1-MLC): five zod templates (contact, event, review, recipe, job), useGenerateObject json mode with maxRetr… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/agents/data-extractor.json`
- [Duplicate Finder Block](https://shadcn.exchange/r/localmode/ui/blocks/photo/duplicate-finder): Union-find near-duplicate detection over cached CLIP image embeddings (no re-embedding) — a tunable threshold slider + Strict/Balanced/Relaxed presets, per-group average similarity via a cosine-similarity-meter, keep-first selection + bulk… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/photo/duplicate-finder.json`
- [Audiobook Reader Block](https://shadcn.exchange/r/localmode/ui/blocks/audio/audiobook-reader): Long-text streaming synthesis (useStreamSpeech) with early playback that begins before synthesis completes, a live clause counter + current-clause display, speed control (0.5x–2.0x), pause/resume/stop transport, a WAV download (audio-{voic… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/audio/audiobook-reader.json`
- [Live Tracker Block](https://shadcn.exchange/r/localmode/ui/blocks/vision/live-tracker): Real-time MediaPipe streaming trackers on live webcam video — one 4-mode block: Hands (21-point skeleton + handedness), Pose (33-point skeleton + person count), Face (478-point mesh + top-8 expression blendshapes behind a default-on toggle… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/vision/live-tracker.json`
- [Threshold Calibrator Block](https://shadcn.exchange/r/localmode/ui/blocks/text-insights/threshold-calibrator): Calibrate a similarity threshold from corpus embeddings via useCalibrateThreshold at percentile 90, over a selected embedding model and corpus, rendering the calibrated threshold versus the model's getDefaultThreshold preset, metadata, dis… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/text-insights/threshold-calibrator.json`
- [PII Redactor Block](https://shadcn.exchange/r/localmode/ui/blocks/privacy/pii-redactor): Detect PII with on-device NER (Xenova/bert-base-NER, BIO prefixes stripped, low-confidence filtered), redact it with reverse-offset [<TYPE>] placeholders honoring per-type toggles plus a core redactPII() regex pass (emails/phones/SSNs/card… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/privacy/pii-redactor.json`
- [Vector Data Manager Block](https://shadcn.exchange/r/localmode/ui/blocks/knowledge/vector-data-manager): Four-format vector import (Pinecone/ChromaDB/CSV/JSONL + native JSON) with auto format-detection, preview, batched cancellable import and a re-embed toggle for text-only rows; native JSON/CSV/JSONL export via vector-export-panel (native ex… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/knowledge/vector-data-manager.json`
- [Voice Explorer Block](https://shadcn.exchange/r/localmode/ui/blocks/audio/voice-explorer): Browse, search, preview, and A/B-compare all 29 Kokoro voices (grouped by language label; play/stop preview where starting one preview stops the previous; sequential A→B synthesis over shared text with a cancel). Kokoro (~86MB) downloads o… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/audio/voice-explorer.json`
- [Voice Notes Block](https://shadcn.exchange/r/localmode/ui/blocks/audio/voice-notes): Record (push-to-talk from a selectable mic) or upload audio → Whisper/Moonshine transcription → saved notes with synced word-by-word replay (real Whisper segment timestamps; disabled with a hint for Moonshine), block-local semantic search… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/audio/voice-notes.json`
- [RAG Chat Block](https://shadcn.exchange/r/localmode/ui/blocks/knowledge/rag-chat): Streaming grounded RAG over its OWN text/PDF corpus — token-by-token answers through the engine-owned generator (granite-4.0-350M) with [n] markers upgraded to hover-card inline citations resolved to retrieved sources (PDF page attribution… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/knowledge/rag-chat.json`
- [Image Captioner Block](https://shadcn.exchange/r/localmode/ui/blocks/image-studio/image-captioner): Generate alt-text captions for images with ViT-GPT2 (Xenova/vit-gpt2-image-captioning, ~230MB) entirely on-device, accumulating results in a gallery (caption as the card label, native per-card delete) with copy-caption-to-clipboard + trans… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/image-studio/image-captioner.json`
- [Semantic Search Block](https://shadcn.exchange/r/localmode/ui/blocks/knowledge/semantic-search): Full text/PDF/OCR ingest into its OWN corpus with off/recursive/semantic chunking and a live chunk-boundary preview, then reranked vector search (over-fetch topK×3 → a real cross-encoder from the transformers ONNX group or the wllama GGUF… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/knowledge/semantic-search.json`
- [Language Detector Block](https://shadcn.exchange/r/localmode/ui/blocks/text/language-detector): Debounced (400 ms) automatic language detection across 110 languages (up to five candidates with name + ISO code + confidence) that runs once typed text reaches 10 characters with no button press, plus a two-text cosine-similarity comparis… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/text/language-detector.json`
- [Encrypted Vault Block](https://shadcn.exchange/r/localmode/ui/blocks/privacy/encrypted-vault): A passphrase-locked, end-to-end encrypted item store driven by useEncryptedVault — AES-GCM ciphertext at rest in IndexedDB, the key derived from the passphrase in memory only — with encrypted notes and imported text documents rendered as l… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/privacy/encrypted-vault.json`
- [Document QA Block](https://shadcn.exchange/r/localmode/ui/blocks/knowledge/document-qa): Extractive question answering (Xenova/distilbert-base-cased-distilled-squad, grounding corpus context via engine.search topK 1, High/Medium/Low confidence tiers) over its OWN text/PDF corpus, plus Donut (Xenova/donut-base-finetuned-docvqa)… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/knowledge/document-qa.json`
- [Write Block](https://shadcn.exchange/r/localmode/ui/blocks/writing-tools/write): A draft editor with live length feedback, preset and free-text edit instructions with prompt improvement, and an AI edit reviewed as a before/after diff with explicit Accept/Reject (Accept applies exactly the after text). Resolves the Chro… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/writing-tools/write.json`
- [Object Detector Block](https://shadcn.exchange/r/localmode/ui/blocks/vision/object-detector): One-shot DETR (Xenova/detr-resnet-50) object detection on an uploaded image, the bundled sample, or a webcam-captured still — color-coded bounding boxes, a unique-label legend, an N-found count, a ranked scored list, in-flight download pro… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/vision/object-detector.json`
- [Smart Gallery Block](https://shadcn.exchange/r/localmode/ui/blocks/photo/smart-gallery): Adaptive, device-aware CLIP photo ingest (streamEmbedManyImages at a computeOptimalBatchSize batch size shown on an adaptive-batch-card) with per-item progress, per-batch zero-shot categorization (other/0 fallback), and a grid/list gallery… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/photo/smart-gallery.json`
- [Text Classifier Block](https://shadcn.exchange/r/localmode/ui/blocks/text-insights/text-classifier): Custom-label zero-shot classification with MobileBERT MNLI over a user-editable label set (add trimmed + case-insensitively deduped, remove, live count) with an email/message textarea and sample loader. Results render a top-result hero (wi… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/text-insights/text-classifier.json`
- [Audio Classifier Block](https://shadcn.exchange/r/localmode/ui/blocks/audio/audio-classifier): MediaPipe YAMNet (521 environmental sound categories) top-8 classification of a microphone recording (MediaRecorder; stop -> automatic classification; recording indicator) or an uploaded audio file, rendered as a ranked list with the top p… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/audio/audio-classifier.json`
- [DevTools Drawer Block](https://shadcn.exchange/r/localmode/ui/blocks/devtools-drawer): A global on-device observability drawer: six tabbed surfaces (inference queues, event log, pipeline runs, model cache, device capabilities, per-collection VectorDB stats) over the @localmode/devtools bridge, plus a lazy framework-agnostic… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/devtools-drawer.json`
- [Photo Categorizer Block](https://shadcn.exchange/r/localmode/ui/blocks/photo/photo-categorizer): Editable-label-set categorization with Photo/Product presets, on-device library re-categorization with progress + cancel (no re-embedding), and a counted, single-select category-facet-list filter over the ingested photos. Own usePhotoLibra… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/photo/photo-categorizer.json`
- [Meeting Assistant Block](https://shadcn.exchange/r/localmode/ui/blocks/audio/meeting-assistant): Audio upload OR pasted transcript → Transcribe → Summarize (DistilBART, maxLength 200 / minLength 60) → Extract action items (useGenerateObject on Granite 4.0 350M) with a visible three-step indicator, a cancel that preserves completed ste… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/audio/meeting-assistant.json`
- [Image Search Block](https://shadcn.exchange/r/localmode/ui/blocks/photo/image-search): Text→image AND image→image search over one shared CLIP vector space — embed a free-text query or a reference image and rank the ingested photo library with a top-K slider (default 20), a visible min-similarity threshold (getDefaultThreshol… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/photo/image-search.json`
- [Model Evaluator Block](https://shadcn.exchange/r/localmode/ui/blocks/text-insights/model-evaluator): Evaluate a selected classifier over a selected labeled dataset via useEvaluateModel, reporting accuracy plus macro precision/recall/F1, run duration, and a color-coded confusion matrix, with completed/total progress and cancel, JSON export… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/text-insights/model-evaluator.json`
- [Model Advisor Block](https://shadcn.exchange/r/localmode/ui/blocks/device/model-advisor): Ranked on-device model recommendations that compute their OWN device context via useCapabilities and rank useModelRecommendations / getModelRegistry over the in-memory registry with ZERO network: a 21-task grouped selector, ranked model-re… `npx shadcn@latest add https://shadcn.exchange/r/localmode/ui/blocks/device/model-advisor.json`
