# vue-nav-auto

> Allows your navbar to be automatically hidden, just like Android. Support for Chrome, Firefox, Safari, Opera, EDGE.

Latest version **0.0.2** (published 2021-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-nav-auto
pnpm add vue-nav-auto
yarn add vue-nav-auto
bun add vue-nav-auto
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-09-30 |
| First published | 2020-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nguyen Thanh |
| Maintainers | tachibana-shin |
| Keywords | scroll, vue-nav-auto, vue, navbar |

## Links

- npm: https://www.npmjs.com/package/vue-nav-auto
- Repository: https://github.com/tachibana-shin/vue-nav-auto
- Homepage: https://github.com/tachibana-shin/vue-nav-auto#readme
- Issues: https://github.com/tachibana-shin/vue-nav-auto/issues
- npm.io page: https://npm.io/package/vue-nav-auto

## Recent versions

- 0.0.2 (latest) — 2021-09-30
- 0.0.1-b1 — 2021-01-08
- 0.0.1 — 2020-10-15

## README

# vue-nav-auto

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/tachibana-shin/vue-i18n-filters/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#)

**Allows your navbar to be automatically hidden, just like Android.**

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```bash
npm install vue-nav-auto
```

```bash
yarn add vue-nav-auto
```

or if you prefer CDN

```html
<script
  type="text/javascript"
  src="https://unpkg.com/vue-nav-auto@latest/dist/vue-nav-auto.umd.js"
></script>
```

## Usage

### Global

```JavaScript
import VueNavAuto from "vue-nav-auto"

app.use(VueNavAuto)
```

```vue.js
<template>
   <vue-nav-auto type="top" class="header">
      <!-- Content -->
   </vue-nav-auto>
</template>

<style lang="scss" scoped>
   .header {
      position: fixed;
      left: 0;
      top: 0;
      z-index: 1024;
   }
</style>
```

### Private

```vue.js
<template>
   <vue-nav-auto type="top" class="header*>
      <!-- Content -->
   </vue-nav-auto>
</template>

<script lang="ts" setup>
import { VueNavAuto } from "vue-nav-auto"
</script>

<style lang="scss" scoped>
   .header {
      position: fixed;
      left: 0;
      top: 0;
      z-index: 1024;
   }
</style>
```

### Configuration

| Property      | Type   | Default | Description                                                                                                                                                               |
| :------------ | :----- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| tag           | String | "div"   | A tag name for component                                                                                                                                                  |
| type          | String | "top"   | will leave the nav bar at the "top" or "bottom"                                                                                                                           |
| offset-hidden | Number | 0       | this determines how much away the screen after hiding the navbar (px)                                                                                                     |
| tracker       | Any    | window  | This will be the object tracking navbar's scroll events like document, window ...                                                                                         |
| duration      | String | "0.01s" | This is the effect smoothing time. It is really not necessary but you should leave it to 10 seconds (0.01s).                                                              |
| slipCoff     | Number | 1       | This is a very special option. it will amplify, shrink or even reverse whether the navbar will be hidden when scrolling up or down. See the example to understand better. |

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

---
_Source: https://npm.io/package/vue-nav-auto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
