Skip to content

Commit

Permalink
chore: update readme and description
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Nov 14, 2021
1 parent eb1081f commit bb8f259
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# FloatSidebar.js
[![NPM version](https://img.shields.io/npm/v/float-sidebar.svg?style=flat)](https://www.npmjs.org/package/float-sidebar)

> A lightweight (2kb gzipped), zero-dependency, javascript library for creating float sidebars. Based on the finite state machine pattern.
> A lightweight (2kb gzipped), zero-dependency javascript library for making a sidebar float.
[Demo](https://jsfiddle.net/vursen/cj4erfnj)

The library is based on the finite state machine pattern that led to a more simple and reliable solution. Read more in [the article on medium](https://medium.com/@vursen/state-machine-for-sticky-blocks-70ca0bf4ee97) (in Russian)
The library is designed on top of the finite state machine pattern, which results in a straightforward solution that is pretty easy to understand and maintain.

More about the approach in [the article on medium](https://medium.com/@vursen/state-machine-for-sticky-blocks-70ca0bf4ee97) (in Russian)

## Install

```bash
npm install float-sidebar
npm install float-sidebar --save
```
or
```bash
Expand Down Expand Up @@ -93,6 +95,11 @@ floatSidebar.destroy();
| forceUpdate() | Recalculates all the dimensions and finally updates the position of the sidebar. |
| destroy() | Disposes the DOM listeners. |


## Similar libraries

- https://github.com/abouolia/sticky-sidebar

## License

FloatSidebar.js is released under the MIT 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 (2kb gzipped), zero-dependency javascript library for making float sidebars based on the finite state machine",
"description": "A lightweight (2kb gzipped), zero-dependency javascript library for making a sidebar float",
"keywords": [
"fsm",
"sidebars",
Expand Down

0 comments on commit bb8f259

Please sign in to comment.