Skip to content

fix(native): Input's label glides on focus, without a second focus ring - #402

Merged
lorant-one merged 1 commit into
previewfrom
fix/native-input-focus
Nov 2, 2026
Merged

lorant-one merged 1 commit into
previewfrom
fix/native-input-focus

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Before: focusing an empty native Input snapped its label to the top. The text control also jumped out of an invisible overlay into the layout. In the web demo, the browser drew a second rounded ring around the text line, inside the field's own border.

After: the label glides from the value's place to the top of the field, as on the web, and the text control stays where it is. The extra ring is gone, since the field's border already shows focus.

How:

  • The label sits absolutely at the top. A transform animates translateY and scale, using the native driver, with transformOrigin: "left top". With reduce motion on, it jumps instead of animating.
  • The field always keeps room for the floating label, so its height doesn't change on focus.
  • The TextInput sets outlineWidth: 0.

Checks run from packages/native: tsc and biome are clean, jest has 137 tests passing, and vitest has 71 passing. I also screenshotted the demo form before and after focus to confirm the change.


Generated by Claude Code

Before, focusing an empty field snapped the label to the top and pulled
the text control out of an invisible overlay into the flow, and on the
web demo the browser drew its own ring around the text line inside the
field's border. The label now animates (transform only, native driver,
none with reduce motion) while the text control stays put, and the
inner ring is off: the field's border already shows focus.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WH2VptULRpwysRyx2fUFos
@lorant-one
lorant-one merged commit 0be7117 into preview Nov 2, 2026
7 checks passed
lorant-one added a commit that referenced this pull request Nov 2, 2026
…ng (#402) (#403)

Before, focusing an empty field snapped the label to the top and pulled
the text control out of an invisible overlay into the flow, and on the
web demo the browser drew its own ring around the text line inside the
field's border. The label now animates (transform only, native driver,
none with reduce motion) while the text control stays put, and the
inner ring is off: the field's border already shows focus.

Claude-Session: https://claude.ai/code/session_01WH2VptULRpwysRyx2fUFos

Co-authored-by: Claude <[email protected]>
@lorant-one lorant-one added the approved label Nov 2, 2026 — with Claude
@lorant-one lorant-one mentioned this pull request Nov 2, 2026
@lorant-one
lorant-one deleted the fix/native-input-focus branch November 15, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants