Skip to content

[V5] - TextInput crashes when using "text-center" or "text-right" or "text-left" in NativeWind v5 (react-native-css: path.split is undefined) #232

Description

@MohammedAbidNafi

Describe the bug
When adding the text-center, text-left, text-right class to a React Native TextInput, the app crashes with Render Error the following is the error:

path.split is not a function (it is undefined)

Image

The error originates in react-native-css at src/native/styles/index.ts in line 250

It appears path is undefined (or non-string) during runtime parsing of the class path. This crash happens when text-center, text-left, text-right is applied to a TextInput. Other components appear unaffected

Reproduction
I reproduced using the recommended template and then upgrading to NativeWind v5:

npx rn-new@latest --nativewind --expo-router

Migrated to NativeWind v5

And added this minimal component:

`
import { TextInput } from 'react-native';

export default function Home() {
return (
<"TextInput"
placeholder="Type here..."
className="mb-4 rounded-md border border-gray-300 p-2 text-center"
/>
);
}
`

Expected behavior
Applying text-center or text-left or text-right to TextInput should center the input text without throwing an exception.

Activity

  1. changed the title [-][V5] - TextInput crashes when using "text-center" in NativeWind v5 (react-native-css: path.split is undefined)[/-] [+][V5] - TextInput crashes when using "text-center" or "text-right" or "text-left" in NativeWind v5 (react-native-css: path.split is undefined)[/+] on Nov 24, 2025
  2. danstepanov commented on Nov 26, 2025

    @danstepanov
    Member

    I've created a minimal repro here and moved this issue to the react-native-css repo https://github.com/danstepanov/text-alignment-bug

  3. moved this to Todo in Roadmapon Nov 26, 2025
  4. RobertOstermann commented on Feb 5, 2026

    @RobertOstermann

    @danstepanov Any ETA on when this will be fixed?

  5. danstepanov commented on Feb 24, 2026

    @danstepanov
    Member

    @RobertOstermann I'm working through the TextInput stuff now. I'll keep you posted.

  6. moved this from Todo to In Progress in Roadmapon Feb 24, 2026
  7. moved this from In Progress to Todo in Roadmapon Mar 19, 2026
  8. added a commit that references this issue on Apr 9, 2026
    6b4c0c8
  9. moved this from Todo to Ready for Release in Roadmapon Apr 9, 2026
  10. added a commit that references this issue on Apr 15, 2026
    72c2f6a
  11. added a commit that references this issue on Jun 17, 2026
    a752625
  12. moved this from Ready for Release to Done in Roadmapon Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions