Skip to content
Journey to Code

Series

Native Browser APIs for Dynamic User Interfaces

BROWSER / NATIVE   Unbundled & Kinetic

Build real interface behavior (lists, motion, components that adapt, keyboard support) with only what the browser already ships.

This series is for you if you know HTML, CSS and basic JavaScript (variables, functions, querySelector, addEventListener) and want to build interactive pages without installing a framework.

  • No added JS dependencies
  • Runnable examples
  • Quiz or challenge in each lesson

TRY IT FIRST / REAL APIS, SMALL EXAMPLES

Built into your browser.
Ready to work.

Three small experiments, no framework runtime. Support labels reflect this browser; unsupported features explain their limits instead of pretending to run. Animation and scroll observation are taught in Browser Animation APIs, and size observation in Beyond Media Queries. The popover and the layout transition are previews: they show what the browser can do, not a lesson on their own.

01 / STATE & MOTIONNot checked

Same element. New state.

Switch the layout with a View Transition, or pulse the card with the Web Animations API. Reduced motion keeps changes instant.

Browser-nativeCompact layout

Enable JavaScript for the motion controls.

document.startViewTransition(update)
02 / THE TOP LAYERNot checked

Above the stacking game.

A real auto popover leaves document stacking contexts. Open it, then dismiss with Escape, an outside click, or its Close button.

DOCUMENT / overflow: hidden

TOP LAYER / ACTIVE

No z-index contest.

This is a native popover, not a modal dialog. The browser provides light dismissal and Escape handling; the rest of the page stays interactive.

Requires the Popover API and JavaScript enhancement.

<div popover="auto">
03 / OBSERVE, DON'T GUESSNot checked

A boundary you can inspect.

Scroll this small viewport to reveal the target. Change its width to see ResizeObserver report the target's content box. These are live readings, not performance scores.

SCROLL TO FIND THE TARGET ↓

OBSERVED ELEMENT

Keep scrolling to move it out of view.

Intersection
Not observed
Content box
Not observed

Intersection is relative to this scroll box, not the whole page. Live readings are not announced on every scroll.

IntersectionObserver + ResizeObserver

JUMP IN / START FROM WHAT YOU WANT TO DO

I want to ... then read

I want to ...Then read
find an element, or handle clicks on many items with one listenerModern DOM Manipulation
add thousands of items, or build cards from a template, without freezing the pageModern DOM Manipulation
run code when something else changes my pageModern DOM Manipulation (MutationObserver)
fade, slide, pause or reverse something from codeBrowser Animation APIs
reveal content when it scrolls into viewBrowser Animation APIs (IntersectionObserver)
make a component adapt to the space it is placed inBeyond Media Queries
follow dark mode and reduced motion, liveBeyond Media Queries (matchMedia)
make drag and touch work the same on mouse, finger and penBeyond Media Queries (Pointer Events)
make a panel usable with only a keyboardBeyond Media Queries (focus)

The lessons

  1. Modern DOM ManipulationFind elements with closest(), add thousands of items with a DocumentFragment, clone a template, and watch changes with MutationObserver. · 7 min read
  2. Browser Animation APIsFade or slide an element with element.animate(), reveal it on scroll, and respect reduced-motion settings, with no animation library. · 9 min read
  3. Beyond Media QueriesBuild a card that adapts to its container, the reader's motion and color settings, and mouse, touch or keyboard input. · 9 min read