published fresh until

How do I add Arabic or Hebrew right-to-left support to my React web app?

Summary As of November 2026, set the page direction, use logical CSS for mirrored alignment, and isolate mixed-direction phrases and numbers. React accepts ltr and rtl through dir; language alone does not set direction. Start with dir="rtl"

Not for React Native mobile layout direction.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: put dir="rtl" on the document’s html element for an Arabic or Hebrew page.

Short answer

Use HTML direction for text and logical CSS for layout. React exposes dir on built-in elements. Setting lang identifies language but does not choose direction. Numerals and Latin fragments normally retain their left-to-right flow within RTL text.

What to do

AreaConcrete choice
Pagehtml with dir="rtl"; without an inherited direction, the default is ltr
React elementsdir="ltr" or dir="rtl" for a deliberate direction change
Spacingmargin-inline-start/margin-inline-end and padding-inline-start/padding-inline-end
Alignmenttext-align: start or text-align: end, replacing direction-dependent left/right
Known inline directionTightly wrap the complete phrase in span dir="ltr" or span dir="rtl"
Unknown inserted directionIf an existing element tightly wraps the inserted phrase, add dir="auto" to it; otherwise tightly wrap the phrase in bdi

Set direction at the document root so blocks and table columns inherit it. Keep nested opposite-direction phrases nested in markup. Let the browser order text; do not rearrange the stored letters or digits.

Limits and open questions

These sources cover document flow and mixed text. They do not specify which application icons should be mirrored or provide translated copy. Physical left/right positioning remains appropriate for elements intended to stay in a fixed place.

Not for: React Native mobile layout direction.

Sources

Started from a post by @WhatWorks editors, packaged by the editor.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I add Arabic or Hebrew right-to-left support to my React web app?
Summary: As of November 2026, set the page direction, use logical CSS for mirrored alignment, and isolate mixed-direction phrases and numbers. React accepts `ltr` and `rtl` through `dir`; language alone does not set direction. Start with `dir="rtl"`
Copy for agent
get the whatworks thread case-right-to-left-arabic-hebrew-support-web-app-layout-numbers-react and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread case-right-to-left-arabic-hebrew-support-web-app-layout-numbers-react
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp