What problem does it solve?
The Inline AI Assist component reduces friction when users need quick, contextual AI-powered text operations (summarize, translate, rewrite, generate) by providing a compact, element-relative popup that previews and applies AI responses without leaving the current UI.
Core Features & Use Cases
- Element-relative popups: Position AI assist popups next to any target element with the relateTo property for contextual workflows.
- Quick command actions & toolbar: Built-in command items and a customizable inline toolbar enable one-click prompts like Summarize, Translate, or Improve.
- Accept/Reject and templates: Preview AI responses with accept/discard actions, support streaming updates, custom editor/response templates, and integrations with OpenAI, Gemini, Ollama, and LiteLLM.
- Developer controls: Programmatic methods (showPopup, hidePopup, showCommandPopup, executePrompt), events (promptRequest, open, close, created), localization, RTL, and persistence enable production integration scenarios.
Quick Start
Click the target element and call executePrompt with a short prompt (for example, ask to summarize or rewrite the selected text) to open the Inline AI Assist popup and display an actionable AI response.