Angular Styles

Make Any List Draggable in Minutes

Make Any List Draggable in Minutes

October 09, 2025

Drag-to-reorder functionality improves UX by letting users customize list order, but implementing it requires handling drag events, calculating drop positions, and managing list state. The Angular CDK Drag and Drop module simplifies this with directives that handle all drag complexity, including visual feedback, drop zones, and reordering logic. This tutorial demonstrates how to add drag-to-reorder functionality to any Angular list using the CDK Drag and Drop module, requiring minimal code and no external libraries.

Modern Angular Animations: Ditch the DSL, Keep the Power

Modern Angular Animations: Ditch the DSL, Keep the Power

September 04, 2025

Angular's deprecated animations module leaves developers wondering how to create advanced animations without the DSL. The modern approach combines Angular's new enter/leave animation primitives with pure CSS animations, providing better performance, hardware acceleration, and simpler code. This tutorial demonstrates how to build complex animations including staggered list animations, sequential effects, and coordinated multi-element transitions using modern Angular animation techniques.

I Built the Smoothest Countdown Timer in Angular

I Built the Smoothest Countdown Timer in Angular

August 14, 2025

Session timeout warnings prevent users from losing unsaved work by providing clear countdown feedback before automatic logout. Building effective session timers requires real-time countdown logic, visual feedback with animations, and color-coded warnings that escalate as time runs out. This tutorial demonstrates how to build a session timer component in Angular with smooth animations, progressive visual warnings, and clear messaging that keeps users informed.

Switch Between Grid & List Views in Angular: Easy & Flexible

Switch Between Grid & List Views in Angular: Easy & Flexible

August 07, 2025

Grid/list view toggles improve UX by letting users choose their preferred content layout, but building flexible toggle components requires managing state, coordinating CSS classes or component trees, and handling both internal and external state management. This tutorial demonstrates how to build a reusable view mode toggle component in Angular that can switch between CSS classes or completely different component structures, supporting both self-contained and parent-controlled state patterns.

Angular Enter/Leave Animations in 2025: Old vs New

Angular Enter/Leave Animations in 2025: Old vs New

July 31, 2025

Angular's deprecated animations module is being replaced by a new enter/leave animation API that's lighter, hardware-accelerated, and simpler than the old DSL-based system. This tutorial demonstrates how to migrate from the legacy :enter and :leave animations to Angular's new animation primitives, showing how to create smooth enter/leave transitions using modern CSS animations and Angular's new animation helpers. You'll learn how to build professional animations without the deprecated module.

Build the Perfect “Show More” Component in Angular

Build the Perfect “Show More” Component in Angular

July 24, 2025

Expandable content components are essential for long-form content, but implementing smooth height transitions requires handling dynamic content heights, coordinating CSS animations, and managing state. This tutorial demonstrates how to build a professional "show more" component in Angular with smooth height transitions, fade effects, and proper state management. You'll learn how to measure content height dynamically, create elegant expand/collapse animations, and handle edge cases like nested content and responsive layouts.

One Slot? Two Slots? Conditional Slots? Solved.

One Slot? Two Slots? Conditional Slots? Solved.

July 10, 2025

Multi-slot content projection in Angular enables flexible component APIs, but managing multiple slots, conditional projection, and fallback content requires understanding Angular's content projection system. This tutorial demonstrates how to create components with multiple named slots, handle conditional content projection, provide fallback content when slots are empty, and conditionally render the same slot in different locations based on component state.

I Updated My Component Host Animation… Here’s the Angular 20 Way

I Updated My Component Host Animation… Here’s the Angular 20 Way

June 26, 2025

Modernizing legacy Angular applications requires replacing deprecated decorators with modern APIs, but knowing what to update and how can be overwhelming. This tutorial demonstrates step-by-step modernization using Angular's latest features: host element bindings replacing @HostBinding and @HostListener, control flow syntax replacing structural directives, and signal inputs replacing @Input decorators. You'll learn how to modernize an existing application, reducing code size and improving performance while maintaining functionality.

I Built a “Cooldown” Button in Angular… Here’s How

I Built a “Cooldown” Button in Angular… Here’s How

June 05, 2025

Double-submit buttons create poor user experiences and can cause duplicate API calls, form submissions, or unintended actions. Cooldown buttons prevent this by disabling themselves after clicks, showing countdown timers, and preventing rapid-fire interactions. This tutorial demonstrates how to build a reusable cooldown button component in Angular using signals for state management and setInterval for countdown functionality, creating a pattern you can use throughout your application.

Show It Once, Then Never Again… One-Time UI in Angular

Show It Once, Then Never Again… One-Time UI in Angular

May 29, 2025

One-time UI elements like onboarding banners and tooltips need to remember their dismissed state across page reloads, but managing this with component state loses persistence. LocalStorage provides persistent storage that survives browser sessions, while Angular signals enable reactive state management. This tutorial demonstrates how to build a reusable structural directive that combines localStorage persistence with signal-based reactivity, creating a one-time UI pattern you can use anywhere in your Angular application.

exportAs in Angular: What It Does and When to Use It

exportAs in Angular: What It Does and When to Use It

May 22, 2025

Directives with public methods or signals need a way to expose their API to parent components, but accessing directive instances from templates requires explicit references. Angular's exportAs property lets you create template references to directives, enabling access to their methods, signals, and properties directly in templates. This tutorial demonstrates how to use exportAs to create reusable directives with clean, declarative APIs, following patterns used by Angular Material components.

You Might Not Need That Service After All 💉

You Might Not Need That Service After All 💉

May 15, 2025

Component communication in Angular often requires prop drilling with inputs/outputs or global services, creating tight coupling and maintenance headaches. Angular's dependency injection system allows you to inject parent or grandparent components directly, eliminating the need for intermediate props or shared services. This tutorial demonstrates how to use component injection to access parent component APIs, share context across component hierarchies, and simplify component communication patterns.

Nobody Wants to See a Blank Screen… Build Smarter Loaders!

Nobody Wants to See a Blank Screen… Build Smarter Loaders!

May 08, 2025

Blank screens and generic spinners create poor user experiences, making apps feel slow even when they're loading quickly. Skeleton loaders improve perceived performance by showing UI structure immediately, providing visual feedback, and creating smooth transitions to real content. This tutorial demonstrates how to build skeleton loaders using Angular's deferred loading, signals for state management, and animations for smooth transitions. Note: This uses Angular's deprecated animations module—modern alternatives are available.

Still Using ControlValueAccessor? It Might Be Overkill 🤷

Still Using ControlValueAccessor? It Might Be Overkill 🤷

May 01, 2025

ControlValueAccessor requires multiple interface methods, providers, and boilerplate code, making simple custom form controls unnecessarily complex. Modern Angular provides simpler alternatives using signal inputs and direct FormControl bindings, eliminating the need for ControlValueAccessor in many cases. This tutorial demonstrates how to build custom form controls without ControlValueAccessor, reducing code complexity while maintaining full form integration and validation support.

Toast Notifications in Angular? Easier Than You Think!

Toast Notifications in Angular? Easier Than You Think!

April 24, 2025

Toast notifications provide user feedback for actions, errors, and system messages, but building them from scratch requires overlay management, positioning, and animation coordination. Angular Material's Snackbar service handles all of this complexity, providing a simple API for displaying toast notifications with actions, custom durations, and styling. This tutorial demonstrates how to implement toast notifications using Angular Material, including advanced patterns like triggering overlays from snackbar actions.

How to Build a Resizable Sidebar in Angular (Step-by-Step)

How to Build a Resizable Sidebar in Angular (Step-by-Step)

April 17, 2025

Resizable sidebars improve UX by letting users customize layouts, but implementing drag-to-resize functionality requires handling mouse events, calculating dimensions, and managing state. The Angular CDK Drag and Drop module simplifies this by providing built-in drag handling, boundary detection, and state management. This tutorial demonstrates how to build a resizable sidebar using only the Angular CDK, creating a professional drag-to-resize experience without external libraries.

How Angular Components Should Communicate in 2025

How Angular Components Should Communicate in 2025

April 10, 2025

Component communication in Angular has evolved from traditional inputs/outputs to modern two-way binding with model inputs, reducing boilerplate and simplifying parent-child data flow. This tutorial demonstrates three component communication patterns: one-way data flow with inputs/outputs, two-way binding with model inputs, and when to use each approach. You'll learn how to implement real-time communication between parent and child components using modern Angular patterns.

The Easiest Way to Add a Modal in Angular

The Easiest Way to Add a Modal in Angular

April 03, 2025

Building modals in Angular often requires third-party libraries or complex overlay code, but the Angular CDK Dialog provides a native, lightweight solution that handles positioning, focus management, and backdrop behavior automatically. This tutorial demonstrates how to create modals using the CDK Dialog service, open any component as a modal, customize styling, and add custom behavior without external dependencies. You'll learn the simplest way to add professional modals to your Angular applications.

Angular Directive Composition API: Enhance Components with Host Directives (v19+)

Angular Directive Composition API: Enhance Components with Host Directives (v19+)

March 27, 2025

Applying multiple directives to components creates verbose templates and makes it easy to forget required directives. Angular's Directive Composition API lets you embed directives directly into components, creating reusable component behaviors that can't be accidentally omitted. This tutorial demonstrates how to use host directives to add functionality like auto-focus, click-outside detection, and accessibility features directly into components, reducing template complexity and improving maintainability.

Angular Reactive Forms: Build Dynamic Checkbox Lists

Angular Reactive Forms: Build Dynamic Checkbox Lists

March 20, 2025

Dynamic checkbox lists are common in Angular forms, but building them with proper state management and "Select All" functionality requires understanding Reactive Forms patterns. This tutorial shows you how to generate checkbox controls dynamically from data, track selected values reactively, and implement a master "Select All" checkbox that toggles all items at once. You'll learn how to handle form state, validation, and user interactions efficiently.