# floating-horizontal-scrollbar

> Floating Horizontal Scrollbar.

Latest version **1.1.1** (published 2015-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install floating-horizontal-scrollbar
pnpm add floating-horizontal-scrollbar
yarn add floating-horizontal-scrollbar
bun add floating-horizontal-scrollbar
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2015-11-12 |
| First published | 2015-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | cvermeul |

## Links

- npm: https://www.npmjs.com/package/floating-horizontal-scrollbar
- Repository: https://github.com/cvermeul/floating-horizontal-scrollbar
- Homepage: https://github.com/cvermeul/floating-horizontal-scrollbar#readme
- Issues: https://github.com/cvermeul/floating-horizontal-scrollbar/issues
- npm.io page: https://npm.io/package/floating-horizontal-scrollbar

## Dependencies (2)

- [resize-event](https://npm.io/package/resize-event.md) *
- [global-offset](https://npm.io/package/global-offset.md) *

## Recent versions

- 1.1.1 (latest) — 2015-11-12
- 1.0.1 — 2015-11-05
- 1.0.0 — 2015-10-11

## README

# floating-horizontal-scrollbar

Display an horizontal scrollbar at the bottom of the window if a div overflows the window height.

## Usage

### Vanilla JS

```html
<div id="container" style="width: 300px; overflow:auto;">
  <div id="content" style="width: 2000px; height: 2000px; background-color: #ccc;"></div>
</div>
```

```js
var scrollbar = require("floating-horizontal-scrollbar");

scrollbar(document.getElementById("container"));
```

### Mithril

```js
var scrollbar = require("floating-horizontal-scrollbar");

var page = {
  view: function(ctrl) {
    var scrollbarConfig = function(element, isInitialized, context){
      if (!isInitialized) {
        scrollbar(element);
      }
    };

    return m("#container", {config: scrollbarConfig, style: "width: 300px; overflow:auto;"},
      m("#content", {style: "width: 2000px; height: 2000px; background-color: #ccc;"})
    );
  }
};

m.mount(document.body, page);
```

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