What's new in Web UI

By Chrome for Developers

Share:

Key Concepts

  • Modern Web UI Principles: Respect user preferences, natural interactions, guided navigation, maximize content/reduce noise, and adapt to form factor.
  • CSS Primitives: contrast-color, light-dark(), @function, if(), corner-shape, border-shape, and text-scale.
  • View Transitions: Same-document, cross-document, and the new Element-Scoped View Transitions.
  • Scroll-Driven UI: Scroll-triggered animations, scroll-target-group (Scroll Spy), and overscroll-gestures.
  • HTML-in-Canvas: A paradigm shift allowing accessible, searchable DOM elements inside <canvas> elements.
  • Modern Web Guidance: AI-ready documentation and tools for developers.

1. Respect User Preferences

The focus is on building trust by honoring system-level settings without requiring manual user configuration.

  • contrast-color(): A CSS function that automatically selects black or white based on the WCAG 2 algorithm to ensure readability against a background.
  • light-dark(): A utility to specify light/dark mode colors in one declaration. It now supports images.
  • @function and if(): New CSS language capabilities that allow for complex conditional logic directly within property values, enabling dynamic theming.
  • text-scale meta tag: Allows websites to respect system-level font size changes (used by >30% of users). It maps system settings to the html element, making rem units automatically responsive.

2. Natural Interactions

Interactions should feel physical and intuitive rather than robotic.

  • Physics-based Easing: Using linear() easing functions to approximate spring/bounce effects.
  • Dialog Enhancements: The <dialog> element now supports declarative light dismiss (closedby="any"), managing focus and screen reader accessibility natively.
  • corner-shape: A property to move beyond simple border-radius, allowing for scoop, bevel, notch, and squircle shapes.

3. Guided Navigation

Helping users maintain context during transitions.

  • View Transitions:
    • Element-Scoped View Transitions: Allows isolating animations to a specific DOM subtree (e.g., a sidebar or grid) without blocking the rest of the page.
    • Two-Phase View Transitions (Prototyping): Enables immediate transition to a skeleton/loading state before the full document transition completes.
  • Scroll-Driven Animations:
    • Scroll-triggered animations: Time-based animations that trigger based on scroll ranges, replacing the need for IntersectionObserver.
    • Scroll Spy: Using scroll-target-group: auto to automatically manage active navigation states based on scroll position.
  • scrollIntoView: Now returns a promise and includes a nearest option to prevent disorienting bubbling of scroll events.

4. Maximize Content & Reduce Noise

  • Scroll-state queries: The scrolled state allows for "hidey-bar" patterns (hiding headers on scroll-down, revealing on scroll-up).
  • Anchored Container Queries: Used for tooltips that reposition and re-orient arrows based on viewport space.
  • border-shape: Allows for complex, non-rectangular geometric borders that remain responsive and support shape-outside for organic text wrapping.
  • 2D Sticky Positioning: position-sticky can now track two different scrollers (one for each axis), enabling sticky headers and columns simultaneously.

5. Adapt to Form Factor

  • Overscroll Gestures: A work-in-progress API to create native-feeling, gesture-driven interfaces (like swiping to close a menu) that work across touch and mouse inputs.

6. HTML-in-Canvas

This is a major paradigm shift. By setting layout-subtree on a canvas, developers can render real, accessible, and selectable DOM elements inside a canvas.

  • Methodology: Use drawElementImage within the paint event to map DOM elements into the canvas.
  • Benefits: Bridges the gap between high-performance graphics (WebGL/WebGPU) and the semantic web (autofill, accessibility, searchability).

7. Lightning Round: Additional Features

  • moveBefore(): Moves DOM elements without destroying their state (e.g., videos keep playing, iframes don't reload).
  • fit-text: Dynamically scales font size to fit container width.
  • text-box-trim: Allows precise vertical centering of text by trimming leading space.
  • Gap Decorations: row-rule and column-rule allow styling gaps in Flexbox/Grid without pseudo-elements.
  • Viewport Units: Now scrollbar-aware, preventing horizontal scrollbars caused by 100vw.
  • Pseudo-element Events: event.pseudoTarget allows JavaScript to interact with pseudo-elements directly.

Synthesis

The 2026 web UI landscape is moving toward declarative, browser-native solutions that replace complex JavaScript libraries. By leveraging new CSS primitives like @function, if(), and border-shape, alongside powerful new APIs like Element-Scoped View Transitions and HTML-in-Canvas, developers can create high-performance, accessible, and physically intuitive experiences that adapt seamlessly to any device or user preference. The introduction of "Modern Web Guidance" further ensures that these advanced capabilities can be implemented reliably using AI-assisted workflows.

Chat with this Video

AI-Powered

Load the transcript when you're ready to chat so the initial page stays lighter.

Related Videos

Ready to summarize another video?

Summarize YouTube Video