GitHub

RTL

PreviousNext

Run the kit right-to-left for Arabic brands like ADIB, Riyad and SAIB.

The kit inherits RTL from Arco Mobile. Flip a single useRtl flag on the ContextProvider and set dir="rtl" on the document — layout direction, flex alignment, cell chevrons, drawers and carousels mirror automatically.

Enable

Two things, both at app startup:

import { ContextProvider } from "@arco-design/mobile-react"
 
// 1. Tell the browser the writing direction (do this before React paints).
document.documentElement.setAttribute("dir", "rtl")
 
// 2. Turn on Arco's RTL mode.
ReactDOM.createRoot(document.getElementById("root")!).render(
  <ContextProvider system="ios" useRtl useDarkMode={false}>
    <App />
  </ContextProvider>
)

For a per-locale app, drive both off the active language instead of hardcoding:

const isRtl = ["ar", "he", "fa", "ur"].includes(locale)
 
document.documentElement.setAttribute("dir", isRtl ? "rtl" : "ltr")
// ...
<ContextProvider system="ios" useRtl={isRtl}>

What flips automatically

  • Layout directionFlex rows, justify shortcuts and page gutters mirror.
  • CellsTouchCell / Arco Cell move the label to the right and flip the trailing chevron to the left.
  • Drawer / PopupSwiper — swipe-in edge and close affordances mirror.
  • Carousel — slide direction and indicator order reverse.
  • Icons that imply direction — Arco's built-in back/forward arrows swap sides.

What you must handle

  • Set dir on the rootuseRtl styles the kit, but the browser still needs dir="rtl" on <html> for native text wrapping, scrollbars and caret behavior.
  • Keep LTR islands LTR — numbers, phone numbers, currency amounts, code and URLs should not mirror. Wrap them:
<span dir="ltr">+971 50 123 4567</span>
  • Custom directional icons — any icon you ship yourself that points left/right (custom back buttons, "next" chevrons) won't auto-flip. Mirror it with a transform when dir === "rtl":
[dir="rtl"] .my-chevron { transform: scaleX(-1); }
  • Prefer logical CSS — in your own overrides use margin-inline-start / padding-inline-end instead of -left / -right so they follow direction.

Per-brand

RTL is orthogonal to theming — any brand can run in either direction. In practice the Arabic-market brands (adib, riyad, saib, sajda, sindibad, uab, aya, dana) ship RTL by default, while the rest stay LTR. The token contract is unchanged; only writing direction differs.