toufali / custom-element-scroll-shadow

Uses Web Components/Custom Element to create a visual separation between fixed header and content upon scroll

Home Page:https://handsomemedia.github.io/custom-element-scroll-shadow/dist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Element: Content Scroll Shadow

Creates visual separation between fixed header and content upon scroll

Demo

https://handsomemedia.github.io/custom-element-scroll-shadow/dist

Notes

  • uses Web Components: Custom Elements, Shadow DOM, and Template
  • self-contained HTML, CSS, and JS
  • uses native Intersection Observer API - more performant than listening to scroll event
  • Custom Elements and Shadow DOM currently need polyfill Firefox and Edge (not implemented here)
  • Intersection Observer currently requires polyfill for Safari

Links

About

Uses Web Components/Custom Element to create a visual separation between fixed header and content upon scroll

https://handsomemedia.github.io/custom-element-scroll-shadow/dist


Languages

Language:HTML 52.8%Language:JavaScript 31.5%Language:CSS 15.8%