Skip to content

docs: Floating label (input / textarea) animation works only when placeholder is set on form tag #138

@alorence

Description

@alorence

On which page do you see this issue?

https://flyonui.com/docs/forms/input/#floating-label

Describe the issue

Hello, and thank you very much for your amazing work on FlyonUI !

I am a bit confused with the use of floating labels.

I see a difference between using them on inputs & textarea with placeholder attribute vs. no placeholder. The focus animation, moving the label from the middle of the component to the top only works when a placeholder attribute is defined on the input (even an empty one).

As soon as the placeholder is removed from the input, the animation is not triggered anymore. I can reproduce this behavior from the docs using browser developer tools to remove placeholder attribute.

Is this an expected behavior? Do you think it could be added to the documentation? I just spent a huge amount of time finding why this didn't work on my project, and finally spotted the need for placeholder attribute ^

Best regards !

What browsers are you seeing the problem on?

Chrome

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions