KendoReact Form Responsive DesignPremium
The Form component and its internal elements support responsive web design by adapting its layout based on the set width or the available screen size.
To create a responsive layout, you can specify arrays of values for certain props, which are applied at different breakpoints. This is achieved using the ResponsiveFormBreakPoint
array, which enables you to define how the layout should behave on various screen sizes.
-
Form
cols
andgutters
props: You can pass an array to thecols
andgutters
props of theForm
component. Each value in the array corresponds to a specific breakpoint, allowing the number of columns and the gutter size to change responsively. -
FormFieldSet
cols
,colSpan
, andgutters
props: Similarly, theFormFieldSet
component accepts arrays for itscols
,colSpan
, andgutters
props. This enables you to control the number of columns, the span of the fieldset, and the gutter size at each breakpoint. -
FieldWrapper
colSpan
prop: ThecolSpan
prop of theFieldWrapper
component can also be set as an array. This allows each field to span a different number of columns depending on the screen size. -
FormSeparator
colSpan
prop: TheFormSeparator
component supports a responsivecolSpan
prop, letting you control how much space the separator occupies at each breakpoint.
By using arrays for these props, you can create highly flexible and adaptive form layouts that look great on any device.
The following example demonstrates how the Form adapts to different screen sizes. Use the device setting panel to choose the desired screen size and observe how the layout responds accordingly.