Skip to content

RTL on web: Menu.Item, Drawer.Section, Appbar.Content, List.Item and TextInput use physical spacing #5283

Open

Description

@Doberjohn

Current behaviour

With PaperProvider direction="rtl" and <html dir="rtl">, these keep left-to-right spacing on web:

  • Menu.Item with a leadingIcon: the 12px gap is a marginLeft on the content, so the title touches the icon. Since fix(text): align right-to-left text to the right on web #5265 aligned the title to the right, short titles that used to sit away from the icon touch it too.
  • Drawer.Section title: its 28px inset is a marginLeft, so the title sits 12px from the right edge while the items' icons start at 48px.
  • Appbar.Content title: marginLeft: 12, so it sits 14px from the back icon in RTL against 26px in LTR.
  • A List.Item inside a List.Accordion with a left icon: its 40px indent is a paddingLeft, so its title ends under the accordion's icon.
  • TextInput's supporting text: textAlign: 'left', so it stays on the left while the label is on the right.

On iOS and Android they lay out correctly, because React Native swaps left and right there in RTL. Related: #3736.

Expected behaviour

The spacing and alignment follow the start and end in both directions (marginStart, paddingStart, start alignment).

How to reproduce?

  1. Render the app inside <PaperProvider direction="rtl"> with <html dir="rtl"> (the example app's RTL switch does both).
  2. On web, open a Menu with leadingIcon items, a Drawer.Section with a title, an Appbar with a back action and a title, a List.Accordion with left and a child List.Item, and a TextInput with supportingText.

Your Environment

software version
web Chromium, WebKit
react-native-web 0.21.4
react-native-paper main (fbf9006)
expo sdk 58

Activity

  1. added this to the 6.0.0 milestone on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions