Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions common-features/adaptive-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Telerik UI for Blazor supports adaptive rendering for the components that incorp
* [Supported components](#supported-components)
* [Basics](#basics)
* [Rendering specifics](#rendering-specifics)
* [Customize the Default Adaptive Breakpoints](#customize-the-default-adaptive-breakpoints)
* [Limitations](#limitations)

## Supported Components
Expand Down Expand Up @@ -65,6 +66,40 @@ Three breakpoints define the rendering options as follows:
**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](#rendering-specifics) at the root level by configuring the [`<TelerikRootComponent>`]({%slug rootcomponent-overview%}). To specify your desired breakpoints:

1. Wrap the content of the `<TelerikRootComponent>` (`@Body` and potentially other elements) in `<ChildContent>` tag.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Wrap the content of the `<TelerikRootComponent>` (`@Body` and potentially other elements) in `<ChildContent>` tag.
1. Wrap the content of the `<TelerikRootComponent>` (`@Body` and potentially other elements) in a `<ChildContent>` tag.

1. Add the `<RootComponentSettings>` component inside the [`<TelerikRootComponent>`]({%slug rootcomponent-overview%}).
1. Add the `<RootComponentAdaptiveSettings>` component inside the `<RootComponentSettings>` tag and configure its properties:

@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)

| Parameter | Type | Description |
| ----------- | ----------- | ----------- |
| `Small` | `int` | The upper boundary of the small threshold. Sets the `max-width` of the small media query in `px`. |
| `Medium` | `int` | The upper boundary of the medium threshold. Sets the `max-width` of the medium media query in `px`.|

>caption Customize the default adaptive breakpoints

<div class="skip-repl"></div>
````RAZOR
@* 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](#supported-components) allow custom values, for example, [ComboBox]({%slug components/combobox/custom-value%}) and [MultiColumnComboBox]({%slug multicolumncombobox-custom-value%}). Using custom values with `AdaptiveMode.Auto` is currently not supported. To expedite the development of this feature, vote for the related feature request in the Blazor Feedback Portal: [Support for custom values in `AdaptiveMode`](https://feedback.telerik.com/blazor/1611829-support-for-custom-values-in-adaptivemode).
Expand Down