Documentation
Guides

Right-to-left

A horizontal group follows the inline direction it inherits. Under dir="rtl" its first panel is on the right, and drags and arrow keys mirror with it.

Right-to-left is a mirror, not a second layout. A horizontal group reads the inline direction its element computes (from a dir attribute on it or any ancestor): under rtl its first panel is on the right, a drag toward the start side shrinks the panel before the separator, and so does the arrow key pointing that way. Your markup and the layout's numbers do not change; your styles use logical sides.

Turning it on

<div dir="rtl" lang="ar">
    <Splitter.Group className="h-96">
        <Splitter.Panel id="folders" defaultSize="25%" minSize="15%">
            …
        </Splitter.Panel>
        <Splitter.Separator aria-label="تغيير حجم المجلدات" className="w-1" />
        <Splitter.Panel id="messages">…</Splitter.Panel>
    </Splitter.Group>
</div>

The panels are flex items of a flex-direction: row group, so the browser already places them right to left; the engine reads the direction when the group binds, so pointer drags and the arrow keys follow it. A vertical group is the same in both directions.

Right to left
Gallery

What mirrors

ltrrtl
first panelleftright
drag the separator rightgrows the panel before itshrinks the panel before it
Right arrowgrows the panel before itshrinks the panel before it
Left arrowshrinks itgrows it
aria-valuenowthe size of the panel before the separatorthe same

The layout, the commands and the saved document are the same in both directions: a document saved in ltr restores the same panel sizes in rtl.

Logical styles

Write sides as start and end (padding-inline-start, border-inline-start; Tailwind ps-, border-s-, start-0) so the same classes are right in both directions. Separators drawn with inset-block and widths need nothing more.

Changing the direction at runtime

Switching dir on a mounted page (a language picker) needs nothing more: the engine watches the dir attribute on each group and its ancestors, through the group's own window (so a group in an iframe or a popup works too), and reads the direction again when it changes. The drags and the keyboard follow at once; engine.get("direction-by", { groupId }) returns it.

document.documentElement.dir = "rtl"; // every group under it is mirrored from now on

A dir inside a panel's content (a paragraph in another language) is not the group's and changes nothing. A direction changed through CSS alone (a class that sets direction) is not an attribute: run engine.run("measure", {}) after it.