material-components / material-components/material-web
Support always floating label for field
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 11.3k
- Forks
- 1.1k
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 13
Description
Discussed in https://github.com/material-components/material-web/discussions/5365
Originally posted by Gnuk January 5, 2024
Hi,
From 1.1.1, do you know how to keep label always floating with a visible placeholder on a Text field?
Ref: https://material-web.dev/components/text-field/.
Example of expectation before focus:
Note: From Angular Material, it's possible to have this behavior with [floatLabel]="always".
Thank you for your help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Text field documentation at material-web.dev and review the linked discussion #5365 for the intended behavior. Done means the label remains floating and the placeholder is visible before focus, matching the reported expectation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scss
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100