Enable RTL
Enable RTL or Right-to-Left mode from store/settings.js
.
export const state = () => ({
state: {
layout: {
rtl: true
}
}
})
How it works
The process of converting regular styles to RTL is automatic and handled by postcss-rtl
. This is already configured in nuxt.config.js
.
module.exports = {
/*
** Headers of the page
*/
head() {
return {
htmlAttrs: {
dir: `${this.$store && this.$store.getters.settings.layout.rtl ? 'rtl' : 'ltr'}`
}
}
},
build: {
postcss: {
plugins: {
'postcss-rtl': {}
}
}
}
}
Frontend Matter
Beautifully crafted Bootstrap themes and templates for modern web apps.
Copyright 2020 © All rights reserved.
Illustrations by Freepik Storyset