responsiveSteps

Allows specifying a responsive behavior with the number of columns and the label position depending on the layout width.

Format: array of objects, each object defines one responsive step with minWidth CSS length, columns number, and optional labelsPosition string of "aside" or "top". At least one item is required.

NOTE: Responsive steps are ignored in auto-responsive mode, which may be enabled explicitly via the autoResponsive property or implicitly if the following feature flag is set:

window.Vaadin.featureFlags.defaultAutoResponsiveFormLayout = true

Examples

formLayout.responsiveSteps = [{columns: 1}];
// The layout is always a single column, labels aside.
formLayout.responsiveSteps = [
{minWidth: 0, columns: 1},
{minWidth: '40em', columns: 2}
];
// Sets two responsive steps:
// 1. When the layout width is < 40em, one column, labels aside.
// 2. Width >= 40em, two columns, labels aside.
formLayout.responsiveSteps = [
{minWidth: 0, columns: 1, labelsPosition: 'top'},
{minWidth: '20em', columns: 1},
{minWidth: '40em', columns: 2}
];
// Default value. Three responsive steps:
// 1. Width < 20em, one column, labels on top.
// 2. 20em <= width < 40em, one column, labels aside.
// 3. Width >= 40em, two columns, labels aside.