Skip to content

docs: note that TextInput textAlign does not flip in RTL unlike Text#5175

Open
Noitidart wants to merge 1 commit into
react:mainfrom
Noitidart:docs/textinput-textalign-rtl-note
Open

docs: note that TextInput textAlign does not flip in RTL unlike Text#5175
Noitidart wants to merge 1 commit into
react:mainfrom
Noitidart:docs/textinput-textalign-rtl-note

Conversation

@Noitidart

Copy link
Copy Markdown
Contributor

Summary

The shared textAlign docs in text-style-props.md (used by both <Text> and <TextInput>) did not mention that its behavior diverges between the two components in RTL mode.

  • On <Text>: textAlign: 'left' behaves as logical start (aligns right in RTL)
  • On <TextInput>: textAlign: 'left' is physical (stays left in RTL) — on both iOS and Android

This PR adds a note to the textAlign section documenting the difference, showing the direction-aware workaround (I18nManager.isRTL ? 'right' : 'left'), and linking to #45255.

Why docs-only?

PRs #57007 and #57201 attempted to add textAlign: 'start'/'end' support — both were closed without merge. Documenting the existing behavior is the pragmatic outcome.

Note on placement

textAlign is not documented directly in textinput.md (that page only has a style section linking out to the shared text style props), so the canonical textAlign section in text-style-props.md is where this note belongs.

The shared textAlign docs (text-style-props.md) did not mention that its behavior diverges between <Text> and <TextInput> in RTL mode. On <Text>, textAlign: 'left' behaves as logical start (aligns right in RTL), but on <TextInput> it is physical and stays left on both iOS and Android. This adds a note documenting the divergence and the direction-aware workaround, linking to react/react-native#45255. PRs #57007 and #57201 attempted to add start/end support but were closed without merge, so documenting the existing behavior is the pragmatic outcome.
@meta-cla meta-cla Bot added the CLA Signed label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant