Skip to content

TextInput: first character jumps vertically when font size set via Uniwind className (text-sm) — inline fontSize works #497

Description

@fendyk

What happened?

When using Uniwind's text-sm className on a TextInput, the text rendering is vertically misaligned. Typing the first character causes the text to "jump" vertically
inside the input, then it settles into a stable (but still slightly off) position once a second character is typed. The same TextInput styled with an inline style={{
fontSize: 14 }} (the value text-sm resolves to) renders correctly with no jump.

The bug only reproduces when the font size comes from a Uniwind className. Inline style works as expected.

Steps to Reproduce

Steps to Reproduce

  1. Clone the repro repo and run npm install.
  2. Start the app: npx expo start -c and open in Expo Go (or a dev build).
  3. Tap the first input (Uniwind text-sm) and type one character — the text visibly jumps vertically.
  4. Type a second character — text settles, but baseline still differs from the inline-styled input below.
  5. Compare with the second input (inline fontSize: 14) — no jump, correct vertical alignment.

Snack or Repository Link

https://github.com/fendyk/uniwind-textinput-bug

Uniwind version

1.6.2

React Native Version

0.83.4

Platforms

iOS

Expo

Yes

Additional information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions