logo The World’s #1 Bootstrap 4 HTML, Angular 10, React, VueJS & Laravel
Admin Dashboard Theme

Vue Right-to-Left (RTL)

Overview

The RTL does not enabled by default and also the RTL CSS files does not included. You can use the prepared webpack bundler to convert the existing SCSS files into RTL CSS files. You can find the webpack.config.js in each of the RTL demo folder.

Generate RTL CSS

  1. Go to [metronic]/theme/vue/[demo]/ folder.

    cd theme/vue/demo1
  2. Run command to install Vue dependencies and extra webpack plugins for RTL generate.

    npm install
  3. Run npm script command to execute webpack with RTL.

    npm run rtl
  4. You will get the bundle CSS with RTL inside [metronic]/theme/vue/[demo]/src/sass/style.vue.rtl.css folder. For Vue RTL to be enabled, this RTL CSS need to be included in the Vue.

  5. Open the Vue main file App.vue file from [metronic]/theme/vue/demo1/src/App.vue. Import RTL CSS style.vue.rtl.css file. Change @import "assets/sass/style.vue"; to RTL CSS @import "assets/css/style.vue.rtl";.

  6. Open the Vue index.html file from [metronic]/theme/vue/[demo]/public/index.html. Add the RTL attributes to the body tag.

    <body direction="rtl" dir="rtl" style="direction: rtl">
  7. Run the Vue as usual using yarn start command.