# Ondai - **Get started** - [Introduction](/docs): shadcn/ui for on-device AI in React Native. Copy-paste components, each a complete AI feature running on the model already in the phone. - [Installation](/docs/installation): Add Ondai to an Expo or bare React Native app in a few minutes. - [How it works](/docs/how-it-works): From npx ondai add to an answer on the phone: the source, the router, the model, and what happens when there is none. - **Guides** - [Core runtime](/docs/core): createOndai, the capability router, availability, hooks and small-model helpers in @ondai/core. - [Providers](/docs/providers): Apple Foundation Models, Gemini Nano and cloud, through the Callstack react-native-ai providers. Llama is not supported yet. - [Theming](/docs/theming): Void, Paper and Glass themes, accent presets, and the token package. - [Variants](/docs/variants): Every component exposes typed variants: presentation, variant, size, radius, accent, density and theme. - [Device support](/docs/device-support): Which devices have a built-in model, and what happens on the ones that do not. - [Small-model guidelines](/docs/small-models): How Ondai designs for 3B-parameter models with a 4,096-token context. - **Components** - [Components](/docs/components): Every Ondai component, grouped by what it does. - **AI components** - [Command bar](/docs/components/command-bar): Spotlight for your app: natural language becomes one of your registered actions or routes, chosen by on-device tool calling, with preview and confirmation. - [Smart input](/docs/components/smart-input): Text, voice or photo fills your zod form on device, with per-field confidence, deterministic refinement and confirm/undo. - [Scan to data](/docs/components/scan-to-data): Camera or photo becomes structured data (receipt, business card, event, or your own schema) via on-device OCR and the local model. - [Summarize](/docs/components/summarize): The gist of long text: card, inline, sheet or tooltip. Streams, and map-reduces input that does not fit the on-device context. - [Rewrite](/docs/components/rewrite): Shorten, expand, friendlier, formal or fix grammar, streamed on device, with replace / diff / side-by-side results and accept/reject. - [Translate](/docs/components/translate): Live translation on device: the original, a row of target languages, the translation streaming in, with copy and an instant swap. - [Tone check](/docs/components/tone-check): Reads the tone of a draft as you type (friendly, neutral, blunt or tense, casual to formal) and offers a one-tap softer rewrite when it reads off. - [Smart reply](/docs/components/smart-reply): Three reply suggestions for the last message in a thread: chips, a stack, or ghost text inside the input, with an optional tone picker. - [Auto tag](/docs/components/auto-tag): Tag and category suggestions constrained to the app's own list, fuzzy-matched after the model answers. - [Text to event](/docs/components/text-to-event): A pasted or selected message becomes a calendar event: title, date, time, place and people fill in one by one with per-field confidence, stay editable, then go to the calendar. - [Semantic search](/docs/components/semantic-search): Search by meaning over the app's own records with a local vector index and hybrid keyword matching, showing why each result matched. - [Ask page](/docs/components/ask-page): Ask about the page on screen. The answer streams in grounded in its text, with tap-to-jump quotes and follow-ups, and says when the page does not hold it. - [Natural filter](/docs/components/natural-filter): A natural-language search request becomes a typed filter/sort object with editable chips. - [Photo caption](/docs/components/photo-caption): A photo in; a caption and accessibility alt text out, written by the on-device vision model. Streamed, editable, copyable, and handed back as alt text. - [Tool confirm card](/docs/components/tool-confirm-card): Approval for any tool call: the call as a trace line, then a card with its parameters and deny or confirm. - [Voice input](/docs/components/voice-input): Push-to-talk that transcribes on device: the mic is the variant's key, a waveform drawn in the variant, then the transcript with Use and Retry. - [Chat](/docs/components/chat): A complete on-device conversation: streamed turns with their trace, stop mid-reply, retry, and history trimmed to the model's context. - [Assistant message](/docs/components/assistant-message): One reply from the on-device model: a trace of what it did, the answer streaming in, its sources, and copy or retry. Includes UserMessage for the person's turns. - [Prompt composer](/docs/components/prompt-composer): Where a person writes to the on-device model: a growing field, attachments, the model badge and a send key that becomes stop while it answers. - [Inline suggest](/docs/components/inline-suggest): A text field that offers the rest of the sentence as ghost text while the person types, from the on-device model. Tab or the Add key takes it. - [Agent run](/docs/components/agent-run): An agent doing a job on the device, step by step: each tool call with its time, approval before anything risky runs, and the answer at the end. - [Voice memo](/docs/components/voice-memo): Talk, and get the memo back as something to act on: a title, a two-line summary and the to-dos you mentioned, ticked and ready to add. All on device.