What is `cdk` in Angular Material 2 components

Ashok Koyi picture Ashok Koyi · Feb 20, 2017 · Viewed 33.8k times · Source

In multiple places within angular material source, there are elements/ css classes that have cdk as their prefix.

Does anyone know what the abbreviation for cdk in angular material context?

Answer

Ashok Koyi picture Ashok Koyi · Feb 21, 2017

CDK is the short form of component dev kit. This signifies that these are general-purpose tools for building components that are not coupled to Material Design

From the material2 changelog

  • Several components in core/, such as Overlay, have had their prefix changed to cdk- (short for "component dev kit"). This signifies that these are general-purpose tools for building components that are not coupled to Material Design.The old selectors are still available as deprecated but will be removed in the next release. The CSS classes have been changed.

For more info on how to use cdk components such as table, overlay, portal, portal host, e.t.c, you can find examples here:

  1. https://github.com/angular/material2/tree/master/src/demo-app
  2. https://medium.com/@caroso1222/a-first-look-into-the-angular-cdk-67e68807ed9b