-
Notifications
You must be signed in to change notification settings - Fork 75
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
Form layout element [💰20] #58
Comments
looks very nice @jouni |
Talked with our internal design team, and was reminded of some important requirements:
|
Ping @macjuan ^^ here are some ideas for form layout (should be moved to ProdPad). |
Since this element now has its own repo, and it has been split into separate features, I’m closing this one. Please follow the issues/milestones in the https://github.com/vaadin/vaadin-form-layout/ repo. |
An element which makes it easy to build common form layouts.
Core features
At minimum, it should provide a way to present field labels/captions on the left side of the field (or right side for RTL languages). When there is not enough horizontal space, the label should be moved on top of the field. The label width should be uniform for all rows in the layout, so that the left (or right on RTL) edge of the fields align. It should be possible to align the labels in the "label column" either left or right (right-aligned being the default perhaps).
It should be possible to layout fields in 2 columns (possibly more in the future if that is seen as a common use case), and some fields can span multiple columns. The columns should also wrap when horizontal space is limited.
It should be possible to divide the overall form into sections using section headers/dividers.
The fields can be any input element, such as text inputs, dropdowns, checkboxes, radio groups, sliders, etc.
The labels could be either "floating" or static. Floating labels probably don’t make much sense for the "column layout" version.
Mockups
Wide layout:
Medium layout:
Narrow layout:
More features
Inspiration
A proof-of-concept example how required indicators, help/description and error messages could be shown, and how help/description/error messages and floating labels could work when the label is placed on the left side of the field: http://codepen.io/jouni/full/dcrAu/
You can also google for "form layout" to get inspiration.
The text was updated successfully, but these errors were encountered: