# Adaptive Rendering

Telerik UI for Blazor supports adaptive rendering for the components that incorporate popup elements. This functionality allows the component to adapt to the screen size by providing different rendering of the popup element based on the screen dimensions.

> caption In this article:

* [Supported components](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#supported-components)
* [Basics](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#basics)
* [Rendering specifics](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#rendering-specifics)
* [Customize the Default Adaptive Breakpoints](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#customize-the-default-adaptive-breakpoints)
* [Limitations](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#limitations)

## Supported Components

The adaptive rendering functionality is supported by the following components:

* [AutoComplete](https://www.telerik.com/blazor-ui/documentation/components/autocomplete/overview)
* [ColorPicker](https://www.telerik.com/blazor-ui/documentation/components/colorpicker/overview)
* [ComboBox](https://www.telerik.com/blazor-ui/documentation/components/combobox/overview)
* [DatePicker](https://www.telerik.com/blazor-ui/documentation/components/datepicker/overview)
* [DateRangePicker](https://www.telerik.com/blazor-ui/documentation/components/daterangepicker/overview)
* [DateTimePicker](https://www.telerik.com/blazor-ui/documentation/components/datetimepicker/overview)
* [DropDownList](https://www.telerik.com/blazor-ui/documentation/components/dropdownlist/overview)
* [DropDownTree](https://www.telerik.com/blazor-ui/documentation/components/dropdowntree/overview)
* [MultiColumnComboBox](https://www.telerik.com/blazor-ui/documentation/components/multicolumncombobox/overview)
* [MultiSelect](https://www.telerik.com/blazor-ui/documentation/components/multiselect/overview)
* [TimePicker](https://www.telerik.com/blazor-ui/documentation/components/timepicker/overview)

## Basics

To enable the adaptive rendering use the `AdaptiveMode` parameter. It takes a member of the `AdaptiveMode` enum:

* `None` (default)
* `Auto`

Optionally, you may set the `Title` and `Subtitle` parameters to provide custom header and subtitle text for the popup on small and medium devices.

> caption Enable the adaptive rendering

```RAZOR.skip-repl
// NOTE: The configurations below includes only the DropDownList, but it is applicable to all of the above listed components

// Adapts to the screen size to use the appropriate rendering.
<TelerikDropDownList ... AdaptiveMode="@AdaptiveMode.Auto" Title="Select item"... />
```

## Rendering Specifics

When you set the `AdaptiveMode` to `Auto`, the component will take the screen size into consideration to use the appropriate rendering. The different rendering targets the popup element of the component and how it will be displayed to the user.

Three breakpoints define the rendering options as follows:

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

|                | **Small**                                           | **Medium**                                                                   | **Large**                                                                                    |
| -------------- | --------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| **Dimensions** | up to 500px                                         | 501px to 768px                                                               | over 768px                                                                                   |
| **Rendering**  | The popup is rendered as a fullscreen action sheet. | The popup is rendered as an action sheet docked to the bottom of the screen. | The popup is rendered as an animation container docked to the main element of the component. |

## Customize the Default Adaptive Breakpoints

You can customize the [above-listed default adaptive breakpoints](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#rendering-specifics) at the root level by configuring the [`<TelerikRootComponent>`](https://www.telerik.com/blazor-ui/documentation/components/rootcomponent/overview). To specify your desired breakpoints:

1. Wrap the content of the `<TelerikRootComponent>` (`@Body` and potentially other elements) in `<ChildContent>` tag.
2. Add the `<RootComponentSettings>` component inside the [`<TelerikRootComponent>`](https://www.telerik.com/blazor-ui/documentation/components/rootcomponent/overview).
3. Add the `<RootComponentAdaptiveSettings>` component inside the `<RootComponentSettings>` tag and configure its properties:

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter | Type                | Description                                                                                         |
| --------- | ------------------- | --------------------------------------------------------------------------------------------------- |
| `Small`   | `int` <br/> (`500`) | The upper boundary of the small threshold. Sets the `max-width` of the small media query in `px`.   |
| `Medium`  | `int` <br/> (`768`) | The upper boundary of the medium threshold. Sets the `max-width` of the medium media query in `px`. |

> caption Customize the default adaptive breakpoints

```RAZOR.skip-repl
@* The below configuration sets the following thresholds:
- Small: 0 to 400px
- Medium: 401px to 900px
- Large: over 900px *@

    <TelerikRootComponent>
        <RootComponentSettings>
            <RootComponentAdaptiveSettings Small="400" Medium="900"></RootComponentAdaptiveSettings>
        </RootComponentSettings>
        <ChildContent>
             @Body
        </ChildContent>
    </TelerikRootComponent>
```

## Limitations

Some of the [supported components](https://www.telerik.com/blazor-ui/documentation/common-features/adaptive-rendering#supported-components) allow custom values, for example, [ComboBox](https://www.telerik.com/blazor-ui/documentation/components/combobox/custom-value) and [MultiColumnComboBox](https://www.telerik.com/blazor-ui/documentation/components/multicolumncombobox/custom-value). Using custom values with `AdaptiveMode.Auto` is supported in Telerik UI for Blazor version 9.0.0 and later.

## See Also

* [Live Demo: AutoComplete](https://demos.telerik.com/blazor-ui/autocomplete/adaptive)
* [Live Demo: ComboBox](https://demos.telerik.com/blazor-ui/combobox/adaptive)
* [Live Demo: ColorPicker](https://demos.telerik.com/blazor-ui/colorpicker/appearance)
* [Live Demo: DatePicker](https://demos.telerik.com/blazor-ui/datepicker/adaptive)
* [Live Demo: DateRangePicker](https://demos.telerik.com/blazor-ui/daterangepicker/adaptive)
* [Live Demo: DateTimePicker](https://demos.telerik.com/blazor-ui/datetimepicker/adaptive)
* [Live Demo: DropDownList](https://demos.telerik.com/blazor-ui/dropdownlist/adaptive)
* [Live Demo: DropDownTree](https://demos.telerik.com/blazor-ui/dropdowntree/overview)
* [Live Demo: MultiColumnComboBox](https://demos.telerik.com/blazor-ui/multicolumncombobox/adaptive)
* [Live Demo: MultiSelect](https://demos.telerik.com/blazor-ui/multiselect/adaptive)
* [Live Demo: TimePicker](https://demos.telerik.com/blazor-ui/timepicker/adaptive)
