Awesome Demos Roundup #21

Carla Flow

by Ichitaro Masuda

sketch 287

by Ryo Ikeda

physical-raymarchig

by Nemutas

Flow Transition Page

by Michal Zalobny

Glowing Marbles

by krautgti

Hyperspace Text

by Johan Karlsson

Terrain Warp

by Ichitaro Masuda

WEBGi Jewelry

by Anderson Mancini

Card Leader

by Michal Zalobny

Driveable Enviro400EV electric London bus

by Robin Hawkes

Spiral

by Michal Zalobny

Curl Flow

by Ichitaro Masuda

Checkbox Accent Color Pixel Art

by Shaw

WebGL Black Hole

by Bruno Simon

Sketch 262

by Ryo Ikeda

Spider 2

by Fabio Ottaviani

gallery-page

by Hisami Kurita

Sketch 255

by Ryo Ikeda

140. chakra

by ycw

Pure CSS Animated Image Zoom

by Adrian Roselli

La Casa de Papel HTML5 cinematics

by Olivier 3lanc

Cool Slider

by @moohdev

Orbit Gallery

by Michal Zalobny

Transmission

by Fabio Ottaviani

Generative Favelas

by Adam Kuhn

3D Scrolling Gallery/Timeline

by Tom Miller

Heros website

by Michal Zalobny

Particles cursor

by Kevin Levron

Interactive Tornado (Three.js & GLSL shader)

by Ksenia Kondrashova

ThreeJS Toys – Neon Cursor

by Kevin Levron

jelly

by saharan

Keyboard Accordion

by Tania Rascia

All the range

by Hakim El Hattab

Untitled

by Toshiya Marukubo

Unique Collection

by Michal Zalobny

stretch

by Schultzschultz

Scrolling Phone

by Anderson Leite

Linear-style Cursor Glow

by David Khourshid

Chaos Sphere

by John Beresford

Awesome Demos Roundup #20

After a long time, we’re back with a new demos roundup! This is a hand-picked collection of the most fun, creative and impressive web experiments we found on the interwebs in the past times.

Hope you enjoy it and that you can draw some inspiration and ideas from this set!

Mechanical Calculator

by Mariya Avtanska

Sketch 202

by Ryo Ikeda

Input Type Range

by Hakim El Hattab

r3f-kirifuda

by Nemutas

Checkbox Animations With Indeterminate State

by Jon Kantner

Sketch 199

by Ryo Ikeda

Infinite Mac

by Mihai Parparita

FunGUI

by resn

Art gallery

by Andrés Tonello

Vaporwave

by Maxime Heckel

Bike Configurator

by NeedleTools

High-performance Depth of Field

by Pixotronics

Untitled

by Toshiya Marukubo

Realistic Grass

by Faraz Shaikh

Pure CSS Mario 64

by Ben Evans

Toggle 3D

by Adir

Turbulent Buttons

by Adam Kuhn

2022

by Hugo Wiledal

r3f-unshift-effect

by Nemutas

Super Mario Scrollable Timeline

by Adam Kuhn

Infinite scrollable and draggable (WebGL)grid

by Jesper Landberg

threejs experiment

by Domenico Bruzzese

City

by Baron Watts

Spline Matrix

by the Spline Team

VirtualBeeb

by Dominic Pajak

Gameboy

by Mustapha Aouas

saturdaynight

by Arno Di Nunzio

Audio-reactive visual with Three.js

by Francesco Michelini

Dan Flashes Complicated Shirt Generator

by Adam Kuhn

Pose Estimation

by Alexandre Devaux

Focusss v2

by Hakim El Hattab

Fox in the wind

by Louis Hoebregts

checkboxland

by Bryan Braun

Akari 1A • Pure CSS • repeating-radial-gradient

by Aris Acoba

CSS Drummer

by Deren

windmill

by Felix Mariotto

Crunk dancer

by Arno Di Nunzio

The post Awesome Demos Roundup #20 appeared first on Codrops.

Memorize Scroll Position Across Page Loads

Hakim El Hattab tweeted a really nice little UX enhancement for a static site that includes a scrollable sidebar of navigation.

The trick is to throw the scroll position into localStorage right before the page is exited, and when loaded, grab that value and scroll to it. I’ll retype it from the tweet…

let sidebar = document.querySelector(".sidebar");

let top = localStorage.getItem("sidebar-scroll");
if (top !== null) {
  sidebar.scrollTop = parseInt(top, 10);
}

window.addEventListener("beforeunload", () => {
  localStorage.setItem("sidebar-scroll", sidebar.scrollTop);
});

What is surprising is that you don’t get a flash-of-wrong-scroll-position. I wonder why? Maybe it has to do with fancy paint holding stuff browsers are doing now? Not sure.

The post Memorize Scroll Position Across Page Loads appeared first on CSS-Tricks.

Sticky Table of Contents with Scrolling Active States

Say you have a two-column layout: a main column with content. Say it has a lot of content, with sections that requires scrolling. And let's toss in a sidebar column that is largely empty, such that you can safely put a position: sticky; table of contents over there for all that content in the main column. A fairly common pattern for documentation.

Bramus Van Damme has a nice tutorial on all this, starting from semantic markup, implementing most of the functionality with HTML and CSS, and then doing the last bit of active nav enhancement with JavaScript.

For example, if you don't click yourself down to a section (where you might be able to get away with :target styling for active navigation), JavaScript is necessary to tell where you are scrolled to an highlight the active navigation. That active bit is handled nicely with IntersectionObserver, which is, like, the perfect API for this.

Here's that result:

It reminds me of a very similar demo from Hakim El Hattab he called Progress Nav. The design pattern is exactly the same, but Hakim's version has this ultra fancy SVG path that draws itself along the way, indenting for sub nav. I'll embed a video here:

That one doesn't use IntersectionObserver, so if you want to hack on this, combine 'em!

The post Sticky Table of Contents with Scrolling Active States appeared first on CSS-Tricks.