What is Angular CDK (Component Development Kit)?
Why Interviewers Ask This
Advanced questions like this reveal whether a candidate has internalized Angular deeply enough to make architectural decisions. Strong answers demonstrate both breadth and depth of experience.
Answer
The Angular CDK provides primitive building blocks for building custom, high-quality UI components without prescribing a specific design language (unlike Angular Material which follows Material Design). Key CDK packages: (1) @angular/cdk/overlay: creates and manages floating UI elements (tooltips, dropdowns, modals) with configurable positioning strategies (flexible, global, connected). Handles: scroll strategies, position recalculation, backdrop, keyboard navigation; (2) @angular/cdk/portal: render components or templates dynamically at arbitrary DOM locations; (3) @angular/cdk/drag-drop: drag and drop with reordering: cdkDrag, cdkDropList, cdkDropListGroup. Handles sorting, transferring between lists, animations; (4) @angular/cdk/virtual-scroll: efficiently render large lists: <cdk-virtual-scroll-viewport itemSize="50"><app-item *cdkVirtualFor="let item of items"></app-item></cdk-virtual-scroll-viewport>. Only renders visible items; (5) @angular/cdk/a11y: accessibility utilities — FocusTrap (trap focus in modal), FocusMonitor (track keyboard vs mouse focus), ListKeyManager (keyboard navigation in lists), AriaDescriber; (6) @angular/cdk/breakpoints: responsive layout utilities — BreakpointObserver watches viewport changes; (7) @angular/cdk/table: generic table that Angular Material table is built on; (8) @angular/cdk/stepper, tree, accordion — behavioral components without styling; (9) @angular/cdk/clipboard, platform, observers — utilities. The CDK is separate from Angular Material — you can use CDK primitives to build your own design system.
Common Mistake
Many candidates answer correctly but can't explain the 'why'. Always be prepared to justify your answer with a concrete example or use case from your Angular experience.
Previous
What is the Angular @defer block?
Next
What is Angular workspace and monorepo architecture?
More Angular Questions
View all →- Advanced What is Angular Ivy and how does it improve Angular?
- Advanced How does Angular handle server-side rendering (SSR) with Hydration?
- Advanced What is Angular's dependency injection hierarchical injector system?
- Advanced What are Angular Signals in detail and how do they compare to RxJS?
- Advanced What is Angular performance optimization techniques?