Open KHIT93 opened 1 year ago
You can use the UInputGroup
component: https://ui.nuxtlabs.com/forms/input#group
I think their point was that there could be variations on the UInputGroup
which would allow foe the label to be as-is, outline or floating as the variants are in the link provided. Just for some more flexibility and perhaps 'app-like' micro-animations.
Just made this PR: https://github.com/nuxtlabs/ui/pull/234 which might open possiblities for this.
Closing this for now, feel free to reopen if the previous pr didn't fix your issue.
@benjamincanac - I'm not sure I'd want to reopen this, but I have the same use case. Looking at the structure of FormGroup, it doesn't look like we can use tailwind's whole "peer" approach for floating labels as the label doesn't follow the input. Do you have another suggestion for implementing?
Sorry for the late reply @benjamincanac
Seems the FormGroup
stuff is getting partially there, but not entirely something that I can get to what is shown in the link that shared initially.
Seems others have showed interest in #514
Will look into it when I get the chance 😊
Hello
I made the request last August for this evolution, is there any progress? (#514)
Thx
I'm not 100% sure, but it seems to be solvable by either adding a property to switch the position of the label and input field, or adding an alternate label slot below the input field.
Would be really great to have floating labels as a feature of this UI kit/library. Have just started to implement parts of it into a larger rewrite of an open-source app where I have currently built the feature myself.
Here is what I have built:
It is quite simple so would need some adjustment to inside the exisiting form input, but usage could be something like this:
Example of this using TailwindCSS can be found here: https://www.material-tailwind.com/docs/react/input It is however for ReactJS