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

[Feature Request] Support adjacent placement of labels for form inputs (Text Fields, Textarea, ...) #19719

Open
JoachimTillessen opened this issue Apr 30, 2024 · 0 comments

Comments

@JoachimTillessen
Copy link

JoachimTillessen commented Apr 30, 2024

Problem to solve

Text inputs that contain their labels do not produce large boxes that do not align nicely when aligned with buttons. Having the ability to place the label outside (on top) the field provides more flexibility for forms layout.
The Material Design Spec mentions this option (albeit briefly):
https://m3.material.io/components/text-fields/guidelines#a2c6b301-66b1-412f-991a-bf9b7ad0a012
Using separate components to inject labels into the form layout will force the developer to handle the for attribute manually which can result in errors affecting accessibility.

Proposed solution

To introduce an additional prop "adjacent-label" to support this layout.

@JoachimTillessen JoachimTillessen changed the title [Feature Request] Support ajacent placement of labels for form inputs (Text Fields, Textarea, ...) [Feature Request] Support adjacent placement of labels for form inputs (Text Fields, Textarea, ...) Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant