Skip to content

Switch physical direction props to logical ones (inline-start / inline-end) for better bidi support #47368

@emrothenberg

Description

@emrothenberg

Summary

I’d like to propose updating MUI’s component internals so that CSS logical properties are used (inline-start, inline-end, margin-inline-start, etc.) instead of physical left/right/margin-left/margin-right.

Rationale

Even with theme.direction = 'rtl', several MUI components still require manual prop changes because their internal styles rely on physical properties or DOM order rather than logical properties. Examples include:

  • Button icon placement (startIcon / endIcon)
  • Chip delete/action icon positioning
  • FormControlLabel margins
  • Various components using marginLeft/marginRight instead of logical equivalents

As a result, bidi apps must manually swap props or override internal styles even when the theme direction is set correctly. Using logical properties internally would ensure that components automatically follow the writing mode without additional work from the developer.

Proposal

  • Replace internal physical layout properties with logical CSS properties.
  • Avoid introducing new optional layers or alternative props; the goal is to align the underlying implementation with logical-direction standards so that components behave correctly in both LTR and RTL out of the box.

This change should not affect user-facing APIs, only internal styling, so backwards compatibility can be maintained while significantly improving RTL/bidi correctness.

I’m willing to implement this and submit a PR, but I’d like confirmation from the maintainers that switching the internal styling model to logical properties is acceptable before starting.

Please advise on whether this direction would be approved or whether it has been discussed previously.

Examples

No response

Motivation

I developed many projects using MUI, all of them in at least two languages, one LTR and one RTL. The RTL theme needed a lot of extra configurations just to get margins and positioning right, as simply changing the theme direction to "rtl" didn't change everything.

Search keywords: bidi, inline, rtl, left, right, logical directions

Metadata

Metadata

Assignees

Labels

scope: all componentsWidespread work has an impact on almost all components.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions