Styling Overview

Kendo UI for Angular provides themes that you can use to style your application.

Currently, the suite ships the following themes:

Theme nameTheme characteristicsTheme package NPM module
Kendo UI Default themeKendo UI own neutral styling@progress/kendo-theme-default
Kendo UI Bootstrap themeMatches the Bootstrap 4 styling@progress/kendo-theme-bootstrap
Kendo UI Material themeFollows the Material Design Guidelines@progress/kendo-theme-material
Kendo UI Fluent themeFollows the Fluent Design System@progress/kendo-theme-fluent
The Package is part of Kendo UI for Angular, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Installation

  1. To start using a theme, install its package through NPM.

    # Default theme
    npm install --save @progress/kendo-theme-default
    
    # Bootstrap theme
    npm install --save @progress/kendo-theme-bootstrap
    
    # Material theme
    npm install --save @progress/kendo-theme-material
    
    # Fluent theme
    npm install --save @progress/kendo-theme-fluent
  2. After the theme package is installed, reference it in your project. You can include kendo-themes in your project in one of the following ways:

The simplest way is to paste a CDN link in the head element of your page. While the Kendo UI for Angular suite does not provide a CDN, you can extract a link from unpkg.

<!-- Default theme -->
<link rel="stylesheet" href="http://unpkg.com/@progress/kendo-theme-default/dist/all.css" />

<!-- Bootstrap theme -->
<link rel="stylesheet" href="http://unpkg.com/@progress/kendo-theme-bootstrap/dist/all.css" />

<!-- Material theme -->
<link rel="stylesheet" href="http://unpkg.com/@progress/kendo-theme-material/dist/all.css" />

<!-- Fluent theme -->
<link rel="stylesheet" href="http://unpkg.com/@progress/kendo-theme-fluent/dist/all.css" />

Using Precompiled CSS

Each Kendo UI theme includes a precompiled dist/all.css CSS file that contains the styles for all Kendo UI components.

node_modules/@progress/kendo-theme-default/dist/all.css

To use dist/all.css, reference it in the angular.json file of the application.

{
  "apps": [
    {
      "styles": [
        {
          "input": "node_modules/@progress/kendo-theme-default/dist/all.css"
        }
      ]
    }
  ]
}

While using the precompiled CSS file is faster than compiling the theme from the source code, the approach has the following drawbacks:

  • It includes CSS for components that may not be used in the application.
  • It does not allow theme customization through SCSS variables (which is possible when you build a theme from the source code) because the theme is already compiled.

Compiling Themes from SCSS Source Files

Angular CLI supports the compilation of SCSS files. To compile the theme in your application, import the style files for the components in use or import the styles for all components.

Importing Specific Component Styles

All Kendo UI for Angular components have a dedicated folder in the Kendo UI themes which contains the SCSS files required for the given component.

As of Angular 15, the tilde (~) import in the angular-devkit package is deprecated. For Angular 14 and earlier versions, you can still use the old import statement ~@progress/kendo-theme-default/dist/all.scss.

The ng add schematics for the Kendo UI packages adds the precompiled CSS file to angular.json. When you use the SCSS files, you have to remove these references.

The following list shows some of the CSS packages which are needed for a particular NPM package.

// Import only the Charts, Grid, and DatePicker styles by using Node Sass.
@import "@progress/kendo-theme-default/scss/dataviz/_index.scss";
@import "@progress/kendo-theme-default/scss/grid/_index.scss";
@import "@progress/kendo-theme-default/scss/datepicker/_index.scss";

// Import only the Charts, Grid, and DatePicker styles by using Dart Sass.
@use "@progress/kendo-theme-default/scss/dataviz/_index.scss";
@use "@progress/kendo-theme-default/scss/grid/_index.scss";
@use "@progress/kendo-theme-default/scss/datepicker/_index.scss";

Importing All Components Styles

You can include the styles for all available components from the dist/all.scss file of the corresponding theme package . However, this will significantly increase the build time and bundle size of the application.

Import the styles in the styles.scss file.

@import "@progress/kendo-theme-default/dist/all.scss";

In the angular.json file reference the SASS file where the theme is imported.

"architect": {
    "build": {
      "options": {
        "styles": [
          "src/styles.scss"
        ]
      }
    }
  }

For more information on how to compile and customize the themes, refer to the Customizing Themes section.