diff --git a/common-features/adaptive-rendering.md b/common-features/adaptive-rendering.md index cd5907d4e4..18810c19de 100644 --- a/common-features/adaptive-rendering.md +++ b/common-features/adaptive-rendering.md @@ -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 @@ -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 [``]({%slug rootcomponent-overview%}). To specify your desired breakpoints: + +1. Wrap the content of the `` (`@Body` and potentially other elements) in `` tag. +1. Add the `` component inside the [``]({%slug rootcomponent-overview%}). +1. Add the `` component inside the `` tag and configure its properties: + +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) + +| Parameter | Type | Description | +| ----------- | ----------- | ----------- | +| `Small` | `int`
(`500`) | The upper boundary of the small threshold. Sets the `max-width` of the small media query in `px`. | +| `Medium` | `int`
(`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 +@* The below configuration sets the following thresholds: +- Small: 0 to 400px +- Medium: 401px to 900px +- Large: over 900px *@ + + + + + + + @Body + + +```` + ## 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). diff --git a/components/rootcomponent/overview.md b/components/rootcomponent/overview.md index c5e3ded68f..b261d3b14c 100644 --- a/components/rootcomponent/overview.md +++ b/components/rootcomponent/overview.md @@ -77,6 +77,9 @@ If you are using Telerik components in a Blazor app with **Per page/component** | `IconType` | `IconType` enum
(`Svg`) | The icon type, which other Telerik components will use to render internal icons. Regardless of this parameter value, you can freely use the [``]({%slug common-features-icons%}#fonticon-component) and [``]({%slug common-features-icons%}#svgicon-component) components, and [set the `Icon` parameter of other Telerik components]({%slug button-icons%}) to any type that you wish. | | `Localizer` | `Telerik.Blazor.Services.ITelerikStringLocalizer` | The Telerik localization service. The recommended approach is to [define the localizer as a service in `Program.cs`]({%slug globalization-localization%}). Use the `Localizer` parameter only in special cases when this is not possible. | +### TelerikRootComponent Settings + +The `TelerikRootComponent` exposes and additional `` tag for further customizations. You can use it to configure the screen breakpoints for the adaptive rendering of the supported components. [Learn how to customize the default adaptive breakpoints](slug://adaptive-rendering#customize-the-default-adaptive-breakpoints). ## See Also