From bb8f259a07d6be0a9ffc8305b94c1f848ad616a9 Mon Sep 17 00:00:00 2001 From: Sergey Vinogradov Date: Sun, 14 Nov 2021 20:32:23 +0300 Subject: [PATCH] chore: update readme and description --- README.md | 13 ++++++++++--- package.json | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bfb0621..4f6e78f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/package.json b/package.json index a486c7a..23c4a03 100644 --- a/package.json +++ b/package.json @@ -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",