RTL Support
Mantine is built with emotion which supports RTL languages with stylis-plugin-rtl.
Install stylis-plugin-rtl
:
Add stylis-plugin-rtl
to your MantineProvider:
You can apply rtl plugin based on locale. Note that you will have to manage popovers positions in some
components (Menu, Popover, etc.) on your side as position
and placement
props are not flipped based on text direction.
Dynamic direction changes
To make rtl dynamic, change cache key when cache changes:
RTL with Next.js
To setup RTL support for Next.js:
- Replace your
_document.tsx
with
- In your
_app.tsx
setdir: 'rtl'
prop on theme and provideemotionOptions
, important!emotionOptions
should be the same as you've provided increateStylesServer
:
Feedback
Your feedback is most valuable contribution to the project, please share how you use Mantine, what features are missing and what is done good
Leave feedback