nuxt / nuxt/ui

feature request | improve floating label support for inputs

Open
#5,551 4 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Package

v4.x

Description

There is a good example of how to achieve a floating label for text inputs: https://ui.nuxt.com/docs/components/input#with-floating-label

However, it is not possible to commit fully to floating labels because not every input supports them (afaik). It is also not applicable because components like <AuthForm /> cant easily be used with floating labels.

Could we perhaps provide the label from the FormField component as a floating label for the input?

Additional context

related https://github.com/nuxt/ui/issues/217#issuecomment-3467409087

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the floating-label Input example in the linked documentation and inspect how FormField provides its label, including usage with AuthForm. Compare which input components support the pattern and define consistent behavior across them; done means floating labels can be used broadly without preventing normal FormField or AuthForm usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
tailwindcss, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.