Solution for MUI v5
dir
attribute to your body
tag or any container where you want to apply rtl direction styles.const theme = createTheme({
direction: 'rtl',
});
rtl
plugin and wrap it around your componentsconst cacheRtl = createCache({
key: 'muirtl',
stylisPlugins: [rtlPlugin],
});
function RTL(props) {
return <CacheProvider value={cacheRtl}>{props.children}</CacheProvider>;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.