Prompt
What should I use for in-context translation preview on web and mobile?
Latest observation
Nov 2, 2026
OpenAI APIWeb search: off
For in-context translation preview on web and mobile, the best choice is usually:
Use a floating preview / overlay that anchors near the text being translated
Web
- Popover / tooltip / anchored card near the selected text
- Or a right-side preview pane if the layout is wide enough
- Best when users need to compare original and translated text quickly
Mobile
- Use a bottom sheet or modal card
- If the user selects text, show a small anchored bubble or slide-up preview
- Bottom sheet works best because screen space is limited
Recommended pattern
If you want one consistent UX across both:
- Desktop/web: anchored popover + optional side panel
- Mobile: bottom sheet
- Keep the original text visible in place, and show:
- translated text
- language pair
- copy / replace / listen actions
- maybe a “show original” toggle
Good UI components to include
- Source text highlighted in context
- Translation preview
- Inline edit / accept / dismiss
- Copy button
- Language switcher
- Confidence or note if translation is machine-generated
If you mean a technical implementation
Common choices:
- Web: React popover, tooltip, or drawer component
- Mobile: native bottom sheet / modal / action sheet
- For shared logic, keep the translation state in a centralized store and render platform-specific preview components
If you want, I can suggest the best UX pattern by use case:
- document translation
- chat/message translation
- website/app UI translation
- selected text translation