New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Overview

Telerik UI for ASP.NET MVC comes with a set of built-in CSS themes that control the visual appearance of the components. Each theme determines the components' colors, borders, backgrounds, size, layout, position, font size, and more.

A theme is a collection of styles in a CSS file, which determine the appearance of the components, including fonts, colors, sizes, and layouts. For example, Default and Bootstrap are two built-in theme names.

Swatch

A theme swatch is a color variation of a theme. All swatches of a given theme use the same fonts, sizes, and layouts. On the other hand, the text colors, background colors and border colors are different. For example, Default Ocean Blue and Bootstrap Nordic are two built-in swatch names.

When the Telerik UI for ASP.NET MVC documentation talks about a given theme name, for example Default, this implies the Main swatch of this theme. In addition, the word "theme" as a general term can imply any swatch of any theme.

The CSS file of any swatch is self-sufficient and contains all required styles for the components, except the optional font icon styles. You can switch the theme runtime, but the ASP.NET MVC app must always load only one theme at a time.

Integration with the Telerik Components

The CSS themes represent an external dependency to Telerik UI for ASP.NET MVC:

Built-in Themes

The Themes - Get Started page lists the built-in themes in Telerik UI for ASP.NET MVC and describes their unique specifics.

Comparing Themes and Swatches

You can explore and compare the built-in theme swatches on the live Telerik UI for ASP.NET MVC demos. Use the Change Theme dropdown above each component example. To test how the available swatches affect the appearance of the components, you can also check the ThemeBuilder app. This tool provides the ability to customize the existing themes and swatches.

Using a Theme

To register a theme, you must reference its stylesheet in the <head> of the web page. Usually, this is the _Layout.cshtml file.

There are two ways to load a Telerik theme, in terms of physical CSS file location.

The ASP.NET MVC app must load only one Telerik theme file at a time. Upgrade the theme with every Telerik UI for ASP.NET MVC version upgrade.

Compatibility and Maintenance

The Telerik themes are decoupled from the Telerik UI components, which leads to the following usage requirements:

If you have an older version of the Telerik Extensions for Visual Studio and you want to create a new Telerik UI for ASP.NET MVC project with version 2023.1.314 (R1 2023 SP1), or a newer version of the components, you must first update the Telerik Extension. To download and install the latest version of the Telerik Extensions, follow the Installing from Visual Studio Marketplace instructions.

  • When loading theme swatches from a CDN, make sure that the theme version is compatible with the Telerik UI for ASP.NET MVC version. Our release notes or compatibility table provide theme compatibility information for each components version. You can also use a newer minor theme version, which doesn't contain breaking changes. In other words, the latest major theme version may be still incompatible with the latest version of Telerik UI for ASP.NET MVC.

Next Steps

See Also

In this article