An open API service indexing awesome lists of open source software.

https://github.com/sectsect/solid-hiding-header

SolidJS header that disappears on scroll down and appears on scroll up.
https://github.com/sectsect/solid-hiding-header

solid-js solidjs sticky-headers typescript

Last synced: about 2 months ago
JSON representation

SolidJS header that disappears on scroll down and appears on scroll up.

Awesome Lists containing this project

README

          


@sect/solid-hiding-header

# @sect/solid-hiding-header

[![Release](https://github.com/sectsect/solid-hiding-header/actions/workflows/release.yml/badge.svg)](https://github.com/sectsect/solid-hiding-header/actions/workflows/release.yml) [![codecov](https://codecov.io/gh/sectsect/solid-hiding-header/branch/main/graph/badge.svg?token=JKS41JGTAV)](https://codecov.io/gh/sectsect/solid-hiding-header) [![CodeQL](https://github.com/sectsect/solid-hiding-header/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/sectsect/solid-hiding-header/actions/workflows/github-code-scanning/codeql) [![npm version](https://badge.fury.io/js/@sect%2Fsolid-hiding-header.svg)](https://badge.fury.io/js/@sect%2Fsolid-hiding-header) ![NPM](https://img.shields.io/npm/l/@sect/solid-hiding-header)

A port of [Hiding Header React](https://github.com/FilipChalupa/hiding-header-react) by [Filip Chalupa](https://github.com/FilipChalupa).

## Demo
Toggles header visibility on scroll. [Demo](https://filipchalupa.cz/hiding-header/demo).

![UI example](https://raw.githubusercontent.com/FilipChalupa/hiding-header/HEAD/screencast.gif)

## Quick start

Install it:

```bash
npm i @sect/solid-hiding-header
# or
yarn add @sect/solid-hiding-header
# or
pnpm add @sect/solid-hiding-header
```

### CSS:

Import `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.

## Usage Example

```tsx
import { HidingHeader } from '@sect/solid-hiding-header';

const Header: Component = () => {
return (



Put your content here



);
};
```

### Allow Top Level HTML `` tag
```tsx
const Header: Component = () => {
return (


Put your content here


);
};
```

See Core API docs for more options.
https://github.com/FilipChalupa/hiding-header/blob/main/README.md

## Changelog

See [CHANGELOG](https://github.com/sectsect/solid-hiding-header/blob/master/CHANGELOG.md) file.

## License

See [LICENSE](https://github.com/sectsect/solid-hiding-header/blob/main/LICENSE) file.

✌️



A little project by @sectsect