Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS only floating Labels #222

Closed
wuda-io opened this issue Nov 1, 2021 · 6 comments
Closed

CSS only floating Labels #222

wuda-io opened this issue Nov 1, 2021 · 6 comments
Labels
discussion enhancement New feature or request

Comments

@wuda-io
Copy link
Member

wuda-io commented Nov 1, 2021

Hey I just discovered https://github.com/anydigital/float-label-css
We could implement this in V2, which solves maybe some of the JS-init issues.
Also needs then less code and also no re-initialization of some components and works with only CSS
What do you think?

@wuda-io wuda-io added enhancement New feature or request discussion labels Nov 1, 2021
@ygorma
Copy link

ygorma commented Nov 1, 2021

Is this even foreseen in Material Design?

@ivanBell199
Copy link

As far as I can see, this approach doesn't work if there is no placeholder in the input.

@wuda-io
Copy link
Member Author

wuda-io commented Nov 3, 2021

Yes..this library was just an example, to show how we can start. I meant to replace the current floating label with a css-only approach.

@ivanBell199
Copy link

Yeah, a CSS only solution would be great. I tried to find it some time ago, but no success. There's either a problem with placeholder or required

@wuda-io
Copy link
Member Author

wuda-io commented Feb 11, 2023

I would suggest to do it with placeholder shown.
In the meantime other frameworks do it also like this,
because it would also be semantically correct and does not require any JavaScript.
I would suggest to solve issues without JS if there is an easy solution available. Wdyt?

@wuda-io
Copy link
Member Author

wuda-io commented Apr 1, 2023

implemented in v2-dev

@wuda-io wuda-io closed this as completed Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants