A port of Hiding Header React by Filip Chalupa.
Toggles header visibility on scroll. Demo.
Install it:
npm i @sect/solid-hiding-header
# or
yarn add @sect/solid-hiding-header
# or
pnpm add @sect/solid-hiding-headerImport node_modules/hiding-header/dist/style.css to your CSS. It's few lines of code. You can alternatively copy paste it and adjust things like z-index to your needs.
import{HidingHeader}from'@sect/solid-hiding-header';constHeader: Component=()=>{return(<HidingHeader><headerclass="py-5"><divclass="inner">
Put your content here
</div></header></HidingHeader>);};constHeader: Component=()=>{return(<HidingHeadercomponent="header"><divclass="inner py-5">
Put your content here
</div></HidingHeader>);};See Core API docs for more options.
https://github.com/FilipChalupa/hiding-header/blob/main/README.md
See CHANGELOG file.
See LICENSE file.
✌️
A little project by @sectsect
