You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: accessibility/accessibility-swatch.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,12 @@ The Default Ocean Blue A11y swatch is built on top of the Default Ocean Blue swa
25
25
26
26
## Using the Accessibility Swatch
27
27
28
-
You can [obtain and use the Default Ocean Blue A11y swatch]({%slug themes-swatches%}#using-built-in-swatches) starting from the following component and theme versions:
28
+
You can [obtain and use the Default Ocean Blue A11y swatch]({%slug themes-overview%}#swatch) starting from the following component and theme versions:
29
29
30
30
*[Telerik UI for Blazor version 4.0.1](https://www.telerik.com/support/whats-new/blazor-ui/release-history/ui-for-blazor-4-0-1)
31
31
*[Themes version 6.0.3](https://github.com/telerik/kendo-themes/releases/tag/v6.0.3)
32
32
33
-
Check section [Theme Version Compatibility]({%slug themes-overview%}#theme-version-compatibility-and-maintenance) for more information about how to align Telerik UI for Blazor versions with theme versions.
33
+
Check section [Theme Version Compatibility]({%slug themes-overview%}#compatibility-and-maintenance) for more information about how to align Telerik UI for Blazor versions with theme versions.
34
34
35
35
> An existing limitation is that the ColorPalette component fails WCAG success criterion 1.4.11. "Non-text contrast for the focus indicator on its items".
Copy file name to clipboardExpand all lines: common-features/cdn.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ The CDN hosts two kinds of static client assets for the Telerik UI for Blazor co
22
22
23
23
The [Telerik CSS themes]({%slug themes-overview%}) are available on two CDN hosts:
24
24
25
-
*`unpkg.com` provides [all built-in theme swatches]({%slug themes-swatches%}#swatch-urls). The version number in the theme URL matches the version of the theme itself. Make sure to [use compatible theme and component versions]({%slug themes-swatches%}#theme-version-compatibility-and-maintenance). For example, use theme version `{{site.themesVersion}}` with UI for Blazor version `{{site.uiForBlazorLatestVersion}}`.
25
+
*`unpkg.com` provides [all built-in theme swatches]({%slug themes-overview%}#swatch). The version number in the theme URL matches the version of the theme itself. Make sure to [use compatible theme and component versions]({%slug themes-overview%}#compatibility-and-maintenance). For example, use theme version `{{site.themesVersion}}` with UI for Blazor version `{{site.uiForBlazorLatestVersion}}`.
26
26
*`blazor.cdn.telerik.com` provides a limited set of popular [theme swatches]({%slug themes-overview%}#basics). The version number in the theme URL matches the version of the Telerik UI for Blazor components, for example, `{{site.uiForBlazorLatestVersion}}`.
Copy file name to clipboardExpand all lines: knowledge-base/change-theme-runtime.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Change Telerik Theme at Runtime
3
3
description: Learn how to switch the Telerik Blazor theme at runtime on the fly with JavaScript.
4
4
type: how-to
5
5
page_title: How to Change the Telerik Theme or Swatch at Runtime
6
-
slug: common-kb-common-kb-change-theme-runtime
6
+
slug: common-kb-change-theme-runtime
7
7
position:
8
8
tags: telerik, blazor, theme
9
9
ticketid: 1442823
@@ -74,7 +74,7 @@ The following algorithm follows the commonly used approach to replace a CSS file
74
74
```
75
75
1. Implement UI that triggers the JavaScript theme change. After the new CSS theme is loaded, refresh all Telerik components that use SVG or Canvas rendering, such as BarCodes, Charts, Gauges, and QR Codes.
76
76
77
-
> Make sure [the version number in the theme URL is compatible with the version of Telerik UI for Blazor]({%slug themes-overview%}#theme-version-compatibility-and-maintenance).
77
+
> Make sure [the version number in the theme URL is compatible with the version of Telerik UI for Blazor]({%slug themes-overview%}#compatibility-and-maintenance).
78
78
>
79
79
> Replace `Index` in the code below with the correct Razor component name.
Copy file name to clipboardExpand all lines: knowledge-base/common-telerik-themes-libman.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ This KB article answers the following questions:
29
29
* How to use LibMan to add Telerik themes to your Telerik Blazor app.
30
30
* How to update local themes in `wwwroot` automatically when a new version is available.
31
31
32
-
[LibMan](https://learn.microsoft.com/en-us/aspnet/core/client-side/libman/) is a client-side dependency manager, which is included in ASP.NET Core. You can use it to automatically download a Telerik theme to the `wwwroot` folder of your app, instead of using [static NuGet assets]({%slug themes-overview%}#loading-themes-from-the-nuget-package) or [Telerik themes CDN]({%slug themes-swatches%}#swatch-urls).
32
+
[LibMan](https://learn.microsoft.com/en-us/aspnet/core/client-side/libman/) is a client-side dependency manager, which is included in ASP.NET Core. You can use it to automatically download a Telerik theme to the `wwwroot` folder of your app, instead of using [static NuGet assets]({%slug themes-overview%}#loading-themes-from-the-nuget-package) or [Telerik CDN]({%slug common-features-cdn%}).
33
33
34
34
The benefits of Libman are:
35
35
@@ -68,7 +68,7 @@ Use the following information when creating the `libman.json` file:
68
68
69
69
> Using the `@latest` theme version requires the latest Telerik UI for Blazor version as well.
70
70
71
-
> In rare cases the `@latest` version may produce an error similar to `The "@progress/kendo-theme-default@latest" library could not be resolved by the "unpkg" provider`. In such cases, replace the `@latest` moniker with a [specific theme version](https://github.com/telerik/kendo-themes/releases), depending on the [theme version compatibility with Telerik UI for Blazor]({%slug themes-overview%}#theme-version-compatibility-and-maintenance). For example, use `^8.0.0` to get the latest version of the major release `8`.
71
+
> In rare cases the `@latest` version may produce an error similar to `The "@progress/kendo-theme-default@latest" library could not be resolved by the "unpkg" provider`. In such cases, replace the `@latest` moniker with a [specific theme version](https://github.com/telerik/kendo-themes/releases), depending on the [theme version compatibility with Telerik UI for Blazor]({%slug themes-overview%}#compatibility-and-maintenance). For example, use `^8.0.0` to get the latest version of the major release `8`.
72
72
73
73
The `libman.json` file below adds the **Main** swatches of [all built-in themes]({%slug themes-overview%}#theme-names) and the font icon stylesheet. Remove the theme or font icons entries that you don't need.
Copy file name to clipboardExpand all lines: knowledge-base/common-theme-customization-options.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,15 +38,15 @@ Is there a simple and streamlined way to customize all component styles?
38
38
39
39
Generally, there are **four** ways to customize the appearance of the Telerik Blazor components. All of them, except the first one, add an extra step to **every** UI for Blazor version update.
40
40
41
-
1.[Use color CSS variables to modify an existing theme]({%slug themes-custom%}#setting-theme-variables).
41
+
1.[Use color CSS variables to modify an existing theme]({%slug themes-customize%}#setting-theme-variables).
42
42
* This approach is supported for theme versions `8.0.0` and Telerik UI for Blazor versions `6.0.0` and above.
43
43
* It is a simple and sustainable way to make minor or major customizations to the **colors** of an existing CSS theme, even at runtime.
44
44
* Upgrading the Blazor components does not require any additional steps with regard to the CSS code, unless there are breaking changes in the CSS variable names.
45
45
* The apperance of the Telerik components depends on CSS code in two different files. If you prefer to avoid this, then create a custom theme.
46
-
1.[Use the ThemeBuilder to create a custom theme]({%slug themes-custom%}#using-themebuilder).
46
+
1.[Use the ThemeBuilder to create a custom theme]({%slug themes-customize%}#using-themebuilder).
47
47
* This option allows [customization of the theme **colors** with the free version, or **full control** with the Pro version](https://docs.telerik.com/themebuilder/introduction#themebuilder-tiers).
48
48
* Upgrading the custom theme is straight-forward via [manual](https://docs.telerik.com/themebuilder/web-app/migrating-projects) or [automatic](https://docs.telerik.com/themebuilder/web-app/automatic-migrations) approach.
49
-
2.[Build a custom theme from the SASS source]({%slug themes-custom%}#building-themes-from-source-code).
49
+
2.[Build a custom theme from the SASS source]({%slug themes-customize%}#building-themes-from-source-code).
50
50
* This option provides **full control** over the resulting CSS code.
51
51
* Upgrading requires you to pull the changes from the [**`kendo-themes`** repo](https://github.com/telerik/kendo-themes) and **rebuild** the custom theme. Ideally, make only [variable and style overrides](https://github.com/telerik/kendo-themes/wiki/Core-Code-Concepts) with minimal edits to our source code itself. However, major customizations may require more changes and maintenance.
52
52
3.[Override theme styles with additional CSS code]({%slug themes-override%}).
@@ -58,10 +58,10 @@ To change the sizing and layout of most or all our components, go for manual the
58
58
59
59
The final decision depends on what and how much you need to customize and what other requirements may appear.
60
60
61
-
[**Figma UI Kits**](https://www.telerik.com/figma-kits) allow designers to include visual representations of the Telerik components in their application designs. Custom kits still [require you to create a custom theme afterwards]({%slug ui-kits/themes%}#choosing-how-to-use-the-ui-kits).
61
+
[**Figma UI Kits**](https://www.telerik.com/figma-kits) allow designers to include visual representations of the Telerik components in their application designs. Custom kits still require you to [create a custom theme]({%slug themes-customize%}) afterwards.
62
62
63
63
64
64
## See Also
65
65
66
-
*[Custom Themes]({%slug themes-custom%})
66
+
*[Custom Themes]({%slug themes-customize%})
67
67
*[Use best practives when overriding theme styles]({%slug themes-override%}#best-practices)
Copy file name to clipboardExpand all lines: knowledge-base/common-upgrade-breaks-css-theme-styles.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ The application is using an outdated CSS theme or swatch.
40
40
To resolve the problem, follow the [recommended UI for Blazor upgrade procedure]({%slug upgrade-tutorial%}):
41
41
42
42
* If using the [Telerik **CDN**]({%slug common-features-cdn%}) - update the [stylesheet file URL]({%slug themes-overview%}#using-a-theme) to the correct version.
43
-
* If using a **local** CSS file in `wwwroot` - replace the stylesheet with a compatible one. If the application is using a [**custom theme**, then recreate it]({%slug themes-custom%}#import-custom-theme).
43
+
* If using a **local** CSS file in `wwwroot` - replace the stylesheet with a compatible one. If the application is using a [**custom theme**, then recreate it]({%slug themes-customize%}#import-custom-theme).
44
44
* If using **static assets** from the NuGet package - clear the browser cache and [add a cache buster for the Telerik CSS and JavaScript files]({%slug common-kb-browser-cache-buster%}).
45
45
46
46
A version update might break custom application CSS styles that are outside the Telerik theme. In this case, then check if the component HTML rendering or CSS classes have changed, and adjust the custom CSS code.
Copy file name to clipboardExpand all lines: styling-and-themes/custom-theme.md
+17-23Lines changed: 17 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Customize Themes
3
3
page_title: Customize Themes
4
4
description: Learn how to create a custom theme for you Blazor application and alter the default appearance of the UI for Blazor components.
5
-
slug: themes-custom
5
+
slug: themes-customize
6
6
tags: telerik,blazor,theme,custom
7
7
published: True
8
8
previous_url: /themes/custom-theme
@@ -11,41 +11,29 @@ position: 10
11
11
12
12
# Customize Themes
13
13
14
-
Custom themes allow you to modify the appearance of the Telerik UI for Blazor components, so they match the desired color scheme and your Blazor app coloring and style.
14
+
There are several ways to customize the appearance of Telerik Blazor components. Each is suitable for specific scenarios and business requirements. This article describes the pros and cons, and compares all CSS customization alternatives.
15
15
16
-
This article contains the following sections:
17
-
18
-
*[Compare the visual customization options for the Telerik Blazor components](#visual-customization-options)
19
16
*[Create custom themes with the Progress ThemeBuilder](#using-themebuilder)
*[Load a custom theme in your app](#loading-custom-themes)
23
21
24
22
> When you use custom themes for Telerik UI for Blazor components, you must recreate the custom theme every time you update the Telerik components in your application. This ensures compatibility and allows you to get the theme updates and fixes.
25
23
26
24
27
-
## Visual Customization Options
28
-
29
-
You can customize the appearance of the Telerik Blazor components in several ways. Each has pros and cons, and each is most suitable for specific scenarios and business requirements. The [Blazor Theme Customization Options]({%slug common-kb-theme-customization-options%}) article offers a comparison between these CSS customization alternatives.
30
-
31
-
32
25
## Using ThemeBuilder
33
26
34
-
[ThemeBuilder](https://docs.telerik.com/themebuilder) is a web application that enables you to create new custom themes by changing the styles of existing built-in themes. Every change that you make is visualized almost instantly. Once you are done styling the UI components, you can export a ZIP file with the desired styles and [use the custom theme in your Blazor app](#loading-custom-themes).
35
-
27
+
[ThemeBuilder](https://docs.telerik.com/themebuilder) is a web application that enables you to create new custom themes by changing the styles of existing built-in themes. Every change that you make is visualized instantly. Once you are done styling the UI components, you can export a ZIP file with the desired styles and [add the custom theme to your Blazor app](#loading-custom-themes).
36
28
37
-
## Setting Theme Variables
29
+
The ThemeBuilder allows [different customization capabilities, depending on the used tier](https://docs.telerik.com/themebuilder/introduction#themebuilder-tiers).
38
30
39
-
The Telerik themes define a collection of theme variables and values. Then, these variables take part in CSS rules to apply consistent styles to all Telerik Blazor components. With regard to colors, the themes rely on a [color system](https://www.telerik.com/design-system/docs/foundation/color/), which is built on [color variable groups](https://www.telerik.com/design-system/docs/foundation/color/swatch/) and [color palettes](https://www.telerik.com/design-system/docs/foundation/color/color-palettes/).
40
31
41
-
It is possible to customize the appearance of the Telerik UI for Blazor components if you override the theme variable values outside the theme CSS file. This spares the need to create and maintain a full custom theme.
32
+
## Setting Theme Variables
42
33
43
-
Each theme defines the same collection of variables, but with different values:
34
+
Each theme defines the same collection of variables, but with different values. For example, here are the [Default theme variables](https://www.telerik.com/design-system/docs/themes/theme-default/theme-variables/). It is possible to override the theme variable values outside the theme CSS file. In this way you can customize the appearance of the Telerik Blazor components without the need to create and maintain a full custom theme.
This approach is supported starting from theme version `8.0.0` and Telerik UI for Blazor version `6.0.0`. Upgrading the Blazor components does not require any additional steps with regard to the CSS code, unless there are breaking changes in the CSS variable names.
49
37
50
38
The example below shows how to customize some of the theme variables.
51
39
@@ -87,6 +75,12 @@ The example below shows how to customize some of the theme variables.
87
75
}
88
76
````
89
77
78
+
## Overriding Theme Styles
79
+
80
+
You can [override theme styles with custom CSS]({%slug themes-override%}), no matter if the app is using a built-in or custom theme. This approach makes sense only for a relatively small number of customization. Beyond that, choose some of the other alternatives on this page.
81
+
82
+
Upgrading may require changes to the additional custom CSS code, but only if there are breaking changes in the HTML output and styling.
83
+
90
84
91
85
## Building Themes From Source Code
92
86
@@ -99,8 +93,8 @@ The [Theme Customization page of the Progress Design System documentation](https
99
93
100
94
Custom themes are used in a [similar way as the built-in themes]({%slug getting-started/what-you-need%}#css-theme). The notable differences are:
101
95
102
-
* The custom theme must reside in the `wwwroot` folder of the Blazor app or on a custom CDN provider.
103
-
* You must [recreate custom themes every time you update the Telerik UI for Blazor version]({%slug upgrade-tutorial%}).
96
+
* The custom theme must reside in the `wwwroot` folder of the Blazor app or on a CDN provider.
97
+
* You must recreate custom themes every time you [update the Telerik UI for Blazor version]({%slug upgrade-tutorial%}).
104
98
105
99
Make sure that the Blazor app is loading only one Telerik theme at a time. If you are replacing a built-in theme with a custom theme, you must remove the `<link>` element of the built-in theme.
Sometimes you may need to make a small change to the appearance of a component, while still using the same [built-in]({%slug themes-overview%}) or [custom]({%slug themes-custom%}) theme.
14
+
Sometimes you may need to make a small change to the appearance of a component, while still using the same [built-in]({%slug themes-overview%}) or [custom]({%slug themes-customize%}) theme.
15
15
16
16
This article provides high-level guidance about the knowledge and tools required to override existing CSS styles without changing the theme's CSS file. In scenarios with a larger number of customizations, it may be [more practical to use a different approach, for example, a custom theme]({%slug common-kb-theme-customization-options%}).
0 commit comments