VuePress EcosystemVuePress Ecosystem
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • active-header-links
  • git
  • palette
  • reading-time
  • rtl
  • Sass Palette
    • Guide
    • Config
  • theme-data
  • toc

rtl

@vuepress/plugin-rtl

This plugin will set direction to rtl on configured locales.

Usage

npm i -D @vuepress/plugin-rtl@next
.vuepress/config.ts
import { rtlPlugin } from '@vuepress/plugin-rtl'

export default {
  plugins: [
    rtlPlugin({
      // options
      locales: ['/ar/'],
    }),
  ],
}

Demo

Options

locales

  • Type: string[]
  • Default: ['/']
  • Details:
    Locale path to enable rtl.

selector

  • Type: SelectorOptions

    interface SelectorOptions {
      [cssSelector: string]: {
        [attr: string]: string
      }
    }
  • Default: { 'html': { dir: 'rtl' } }

  • Details:

    Selector to enable rtl.

    The default settings mean that the dir attribute of the html element will be set to rtl in rtl locales.

Edit this page on GitHub
Last Updated:: 4/12/25, 7:03 PM
Contributors: Mister-Hope, meteorlxy, pengzhanbo
Prev
reading-time
Next
Sass Palette