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

Wrapping support in HorizontalLayout and VerticalLayout #7949

Closed
rolfsmeds opened this issue Oct 7, 2024 · 1 comment · Fixed by vaadin/flow-components#6839
Closed

Wrapping support in HorizontalLayout and VerticalLayout #7949

rolfsmeds opened this issue Oct 7, 2024 · 1 comment · Fixed by vaadin/flow-components#6839
Assignees
Labels

Comments

@rolfsmeds
Copy link
Contributor

rolfsmeds commented Oct 7, 2024

Describe your motivation

Wrapping is the easiest way to create responsive layouts, but our two primary layout components lack an API for enabling wrapping.

Describe the solution you'd like

API for wrapping in HorizontalLayout and VerticalLayout, e.g.

Flow: layout.setWrap(true);

WC: <vaadin-horizontal-layout theme="wrap">

The API simply applies flex-wrap: wrap; on the layout root.

(flex-wrap: wrap-reverse can be kept outside the scope for now, and I feel that it's too niche to warrant an enum-based API. Instead, an optional second parameter could be used in Flow, e.g. setWrap(boolean wrap, boolean reverse) if there is demand for it.)

Describe alternatives you've considered

No response

Additional context

No response

@DiegoCardoso DiegoCardoso self-assigned this Nov 8, 2024
DiegoCardoso added a commit that referenced this issue Nov 8, 2024
Adds a new `wrap` theme to `vaadin-horizontal-layout` that simply sets
the `flex-wrap` CSS property on the element to `wrap`, allowing elements
to move to the next line, if there's no space left.

Fixes #7949
@DiegoCardoso
Copy link
Contributor

Closed by mistake. Reopening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: December 2024 (24.6) - Released
Development

Successfully merging a pull request may close this issue.

2 participants