skip to content

Component/Design-system Libraries

Ready-made UI kits, unstyled headless primitives, accessibility hook libraries and animation toolkits. Interviewers ask because choosing between a full kit and headless primitives is the design-system decision every frontend team makes once and lives with.

on this pageshow

explore

questions

66 · 1 section

In Angular Material 22, how do you wire a mat-datepicker and its toggle to a text input, and what must the app provide first?

level: juniorimportance: must knowfreq 48%
basics
~10 s

Give the mat-datepicker a template reference, bind the input with [matDatepicker]="picker" and the mat-datepicker-toggle with [for]="picker", and provide a DateAdapter, for example provideNativeDateAdapter(), in the app config; without one the datepicker throws.

open as a page

In Angular Material, how do you open an archive-project confirmation with `MatDialog` and read the user's choice in the component that opened it?

level: juniorimportance: must knowfreq 58%
basics
~10 s

Inject MatDialog and call open(ArchiveProjectDialog); it returns a MatDialogRef. Buttons close it with [mat-dialog-close]="true" or dialogRef.close(value), and afterClosed() emits that value to the opener, or undefined after Escape or a backdrop click.

open as a page

With the Angular CDK's cdkDropList and cdkDrag directives, how do you make a playlist reorderable, and why would a dragged track snap back?

level: juniorimportance: must knowfreq 44%
basics
~20 s

In the Angular CDK, put cdkDropList on the container and cdkDrag on each row, handle cdkDropListDropped by calling moveItemInArray with previousIndex and currentIndex. The CDK never reorders your array, so without that handler the row returns to its slot.

open as a page

In Angular Material, how do you build a text field from mat-form-field, matInput, mat-label, mat-hint and mat-error, and what does each part do?

level: juniorimportance: must knowfreq 55%
basics
~20 s

mat-form-field wraps one control and draws its label, container and subscript line; matInput makes a native input that control. mat-label floats, mat-hint sits below, and mat-error takes the hint's place once the control is in an error state.

open as a page

In Angular Material, how does a `mat-table` build its rows from `matColumnDef`, `matHeaderRowDef` and `matRowDef`?

level: juniorimportance: must knowfreq 58%
basics
~20 s

Each matColumnDef names a column and holds its header and cell templates. The header and data row definitions take a list of column names that decides which columns render and in what order, and the table stamps one data row per item.

open as a page