Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Jul 22, 2019
1 parent fbeaabb commit 138780a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FloatSidebar.js
[![NPM version](https://img.shields.io/npm/v/float-sidebar.svg?style=flat)](https://www.npmjs.org/package/float-sidebar)

> Lightweight (2kb gzipped), vanilla javascript plugin for making smart float sidebars
> Lightweight (2kb gzipped), zero-dependency vanilla javascript library for making float sidebars
[Demo](https://jsfiddle.net/vursen/cj4erfnj)

Expand All @@ -10,9 +10,11 @@
```bash
npm install float-sidebar
```
or
```bash
yarn add float-sidebar
```
or
```html
<script src="./path/to/float-sidebar.min.js"></script>
```
Expand Down Expand Up @@ -55,6 +57,16 @@ floadSidebar.forceUpdate();
floatSidebar.destroy();
```

```css
.sidebar {
/* Required */
position: relative;

/* Required. Sidebar element should have a fixed width */
width: 220px;
}
```

## Options

#### sidebar
Expand Down Expand Up @@ -107,7 +119,7 @@ Force recalculate and update sidebar position

#### destroy()

destroy plugin (doesn't delete DOM elements)
Destroy plugin (doesn't delete DOM elements)

## License

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "float-sidebar",
"description": "Lightweight, vanilla javascript library for making smart float sidebars",
"description": "Lightweight (2kb gzipped), zero-dependency vanilla javascript library for making float sidebars",
"version": "1.1.0",
"main": "./dist/float-sidebar.min.js",
"module": "./dist/float-sidebar.js",
Expand Down

0 comments on commit 138780a

Please sign in to comment.