RTL Support
Mantine is built with emotion which supports RTL languages with stylis-plugin-rtl.
Install stylis-plugin-rtl:
Add dir="rtl" to html element:
Add stylis-plugin-rtl and theme.dir to your MantineProvider:
Dynamic direction changes
To make rtl dynamic, change cache key when cache changes (!important cache key cannot be the same):
RTL with Next.js
To setup RTL support for Next.js:
- Replace your
_document.tsxwith
- In your
_app.tsxsetdir: 'rtl'prop on theme and provideemotionOptions, important!emotionOptionsshould be the same as you've provided increateStylesServer: