VitePress 2.0 Alpha 21 Adds Native Right-to-Left Layouts
VitePress 2.0.0-alpha.21, released Oct. 25, adds native RTL support to the default theme, asset sharding and 29 fixes. RTLCSS plugins must go.

VitePress 2.0.0-alpha.21, dated Oct. 25 in the project’s changelog, adds native right-to-left support to the default theme. It also lists support for asset sharding and 29 bug fixes. The previous alpha, 2.0.0-alpha.20, shipped Sept. 4.
Setting dir to rtl mirrors the whole theme
The dir: 'rtl' setting now makes the default theme mirror itself, according to the pull request that added the feature. The setting works site-wide, per locale or per page through frontmatter, and accepts 'ltr', 'rtl' or 'auto'. The aside option mirrors too: aside: 'left' now means the side where reading starts, which is the right in RTL.
The pull request says the theme’s left and right margins, paddings, borders and text-align values became logical properties, and it removes 33 RTLCSS control comments. Code blocks stay left-to-right inside RTL pages, with the copy button and line gutter kept alongside the code. The dev server’s HTML shell now carries the locale’s lang and dir, so pages no longer paint left-to-right before mounting.
Sites using an RTLCSS plugin must remove it
The pull request tells sites to drop postcss-rtlcss or any other RTLCSS plugin, because the plugin would flip the theme’s mirrored transforms a second time. It also narrows the type of dir from string to 'ltr' | 'rtl' | 'auto', which the pull request calls a type-level break for configs that pass a plain string.
The pull request lists limits. A build.cssTarget below Chrome 89 or Safari 15 makes the layout follow lang instead of dir. GFM table alignment stays physical. The Algolia DocSearch modal ships its own physical CSS.
Asset sharding closes issue 5427
The changelog’s feature list pairs the RTL theme with “support for asset sharding.” The sharding pull request, merged Sept. 13, fixes issue #5427, titled “Asset chunking.”
The 29 fixes cover search, prefetching and Markdown
The fix list includes local search that now segments Chinese and Japanese text and prefetching that no longer creates a link while offline. It also covers include markers that leaked into code fences, image dimensions that were not inferred when a URL had a suffix, and a sidebar spacing bug on pages with no sidebar. Several theme fixes target Safari 27 and WebKit 27 rendering.
Key takeaways
dir: 'rtl'mirrors the default theme, per site, locale or page.- Remove RTLCSS plugins before upgrading, or the mirroring flips twice.
diris now typed as'ltr' | 'rtl' | 'auto'.- Asset sharding closes issue #5427, “Asset chunking.”
The take
We think the RTL change is the one to test first, because it replaces a workaround with a built-in. Sites that served Arabic, Hebrew or Persian readers had to bolt on a plugin that rewrote CSS at build time. When the theme and the plugin both flip the same rule, the layout ends up backward again. That is why the pull request asks for the plugin’s removal. Teams with RTL locales should upgrade a branch, delete the plugin, and check the sidebar, hero and navigation menu in each locale. Teams on a stable VitePress 1.x line should hold off, since alpha 21 is still a pre-release.


