# Form Adaptiveness

Adaptiveness is an advanced capability that allows you to configure the Kendo UI for Angular Form to display in different layouts depending on the screen size.

The Form adaptiveness is the ability of the Kendo components to automatically adjust their layout, behavior, and appearance according to the device and screen size. This ensures that the form remains user-friendly and visually appealing on both mobile and desktop devices. Internal components like [Kendo UI for Angular DropDowns](https://www.telerik.com/kendo-angular-ui-develop/components/dropdowns) appear in a completely new layout depending on the device.

The following example demonstrates how the Form adapts to different screen sizes. Use the device settings panel to choose the desired screen size and observe how the layout responds accordingly.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/inputs/form/adaptive/source.txt)

## Adaptive Breakpoints

The [`cols`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent#cols), [`colSpan`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent#colspan), and [`gutters`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent#gutters) properties can be configured to change dynamically based on screen size, allowing you to create flexible and user-friendly forms that look great on any device. All responsive features support the [`ResponsiveFormBreakPoint`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/responsiveformbreakpoint) interface, which defines breakpoint ranges and their corresponding values:

```ts
public responsiveBreakpoints: ResponsiveFormBreakPoint[] = [
    { minWidth: 0, maxWidth: 600, value: 1 },    // Mobile: 1 column
    { minWidth: 601, maxWidth: 900, value: 2 },  // Tablet: 2 columns
    { minWidth: 901, value: 3 }                  // Desktop: 3 columns
];
```

Each breakpoint object contains:

* `minWidth`—Minimum screen width (in pixels) for this breakpoint.
* `maxWidth`—Maximum screen width (optional; omit for the largest breakpoint).
* `value`—The value to apply (number of columns, pixels for gutters).

### Columns

You can control the number of columns in [Form](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formcomponent) or [FormFieldSet](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent) containers using the `cols` property. This property accepts either a number or an array of [`ResponsiveFormBreakPoint`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/responsiveformbreakpoint) objects to define how many columns to display at different screen sizes.

```html
<form kendoForm [cols]="responsiveColumns">
    <fieldset kendoFormFieldSet [cols]="responsiveFieldsetColumns">
        ...
    </fieldset>
</form>
```

### Column Spanning

You can control how many columns a [FormField](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldcomponent), [FormFieldSet](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent), or [FormSeparator](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formseparatorcomponent) spans by using the `colSpan` property. This property accepts either a number or an array of [`ResponsiveFormBreakPoint`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/responsiveformbreakpoint) objects to define how many columns the field needs to span at different screen sizes.

```html
<form kendoForm [cols]="4">
    <kendo-formfield [colSpan]="responsiveSpanning"> </kendo-formfield>
    <fieldset kendoFormFieldSet [colSpan]="responsiveSpanning">
        <kendo-formfield> ... </kendo-formfield>
        <kendo-formfield> ... </kendo-formfield>
    </fieldset>
    <kendo-form-separator [colSpan]="responsiveSeparatorSpan"> </kendo-form-separator>
</form>
```

### Gutters

You can control the spacing between form elements using the `gutters` property. You can set the gutters to the [Form](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formcomponent) component or to the [FormFieldSet](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent) component.

The `gutters` property accepts:

* A number (fixed pixels).
* An array of [`ResponsiveFormBreakPoint`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/responsiveformbreakpoint) objects to define gutter sizes for different screen sizes.
* [`Gutters`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/gutters) interface which allows you to set different pixel values for the columns and rows of the form.

```html
<form kendoForm [gutters]="responsiveGutters">
    <fieldset kendoFormFieldSet [gutters]="gutters">
        <kendo-formfield> </kendo-formfield>
        <kendo-formfield> </kendo-formfield>
    </fieldset>
</form>
```

```ts
public responsiveGutters: ResponsiveFormBreakPoint[] = [
    { minWidth: 0, maxWidth: 400, value: 1 },
    { minWidth: 401, maxWidth: 600, value: 2 },
    { minWidth: 601, maxWidth: 900, value: 3 }
];

public gutters: Gutters = {
    columns: 10, // 10px gutter between columns
    rows: 5      // 5px gutter between rows
};
```

## Suggested Links

* [Form Layout](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/form/layout)
* [API Reference of the Form](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formcomponent)
* [API Reference of the FormField](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldcomponent)
* [API Reference of the FormFieldSet](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/api/formfieldsetcomponent)
