Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Localization (RTL) in Radix UI Dropdowns
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[LANGUAGES] - ✦
[DIRECTION_STRATEGY] - ✦
[MIRRORING_LOGIC]
radix-ui-rtl-dropdown-support.txt
Configure Radix UI Dropdown and Popover components for internationalization, specifically focusing on Right-to-Left (RTL) support for [LANGUAGES]. Implement a [DIRECTION_STRATEGY] using the 'dir' attribute on Radix primitives. Detail the [MIRRORING_LOGIC] for chevron icons and submenu slide-in animations. Ensure that keyboard navigation (Left/Right arrows) is automatically flipped for RTL locales. Provide a React Context example that passes the current directionality to all Radix roots.
Example Output
"The AI generates a localization wrapper that detects the current locale and dynamically sets the 'dir' prop on Radix UI's DirectionProvider, adjusting layout and logic accordingly."