Flip Switch: Live Code Session - Supercharged
summary
Live-coding builds a clickable circular “flip switch” using ES2015, Custom Elements (v1) and Shadow DOM inside an HTML import; it flips a front/back face with 3D transforms, adds a ripple, and updates the front value from back-button clicks. The demo emphasizes GPU-friendly transforms/opacity, uses will-change to avoid repaint flashes, computes ripple size with Pythagorean math on resize, notes inert polyfill for accessibility, runs in Chrome and is prototype-only, not production-ready.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 2:13Project setup
- 4:21Custom elements structure
- 5:46Shadow DOM implementation
- 7:44Styling the UI
- 11:30Implementing 3D transforms
- 13:10Managing 3D perspective
- 15:42Adding flip interactivity
- 18:57Adding interface buttons
- 22:00UI layout and animations
- 25:01State management and events
- 29:46Implementing ripples
- 34:03Handling window resizing
- 39:24Adding drop shadows
- 48:05Customizing component attributes
- 53:18Refining UX and conclusion








