nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Label position is affected by the height of the error message

Open dklymenk opened this issue 2 months ago • 4 comments

HeroUI Version

2.8.5

Describe the bug

The combination of label's absolute positioning with top-1/2 and the nearest relative parent containing both the form element and the validation message makes it so the position of the label changes based on the number of lines in the error message.

Your Example Website or App

https://heroui.app/NUsmtqN

Steps to Reproduce the Bug or Issue

  1. Go to https://heroui.app/NUsmtqN
  2. Select anything but "Cat" in the select menu
  3. Observe the label shifting on top the select

Expected behavior

The label should stay above the select.

Screenshots or Videos

Image

Operating System Version

macOS

Browser

Firefox

dklymenk avatar Oct 10 '25 16:10 dklymenk

ENG-2842

linear[bot] avatar Oct 10 '25 16:10 linear[bot]

@wingkwong Can I try to solve this issue?

IsDyh01 avatar Oct 11 '25 02:10 IsDyh01

@IsDyh01 go ahead

wingkwong avatar Oct 11 '25 02:10 wingkwong

@wingkwong When labelPlacement=outside and data-has-helper=true, I change the absolute positioning of the label to a relative positioning, just like isMultiline=true.

IsDyh01 avatar Oct 11 '25 07:10 IsDyh01