CSS in 2024 (Experimental Features)

CSS in 2024 (Experimental Features)

Using experimental CSS features to build an advanced UI component, showcasing CSS Anchoring to attach the tooltip to the slider and Scroll-Driven Animations to drive the slider’s value and color change.

Multiple Popovers with Anchor Positioning and @property

Multiple Popovers with Anchor Positioning and @property

An advanced UI flow demonstrating the power of the native HTML Popover API for sequential dialogs, utilizing the toggle event and hidePopover() in Vanilla JS to create smooth, zero-dependency popover chaining with custom spring and fade CSS animations.

Progressive Anchor Pagination Component

Progressive Anchor Pagination Component

A demo of a customizable pagination component, utilizing CSS Anchoring for seamless active state transitions and the View Transitions API for flicker-free theme switching.

Animated Segmented Control in Plain CSS

Animated Segmented Control in Plain CSS

A pristine Segmented Control built entirely with CSS, leveraging the power of experimental position-anchor and anchor-name to dynamically position and animate the active and hover indicator backgrounds without needing any JavaScript.

CSS-Only Testimonials Using Scroll Snap

CSS-Only Testimonials Using Scroll Snap

A powerful demonstration of building a full-featured carousel entirely with CSS, leveraging experimental ::scroll-button, ::scroll-marker, and position-anchor for navigation, indicators, and positional layout without any JavaScript.

Action Bar - 'Follow the Leader' Dynamic Indicator

Action Bar - 'Follow the Leader' Dynamic Indicator

The key feature is the use of modern CSS positioning to create a dynamic indicator. User interaction, including hover and focus effects, is managed by JavaScript, which sets CSS variables for adaptive and visually appealing behavior.

Action Bar - 'Follow the Leader' Magnifying Lens

Action Bar - 'Follow the Leader' Magnifying Lens

This is not just a demo, but a practical example of using CSS Anchor Positioning to create an interface. JavaScript efficiently toggles classes and attributes, while CSS handles all the positioning and animation logic, making the code clean, separated, and easy to maintain.

Author Cards with Popover APIexternal link

The demo uses the new CSS position-anchor with the popover attribute for native and flexible positioning of hover cards relative to text links. The code applies minimal Vanilla JS solely to invoke the native popover.showPopover() method, showcasing the shift to declarative UI.