@bezet/contentmeter
v0.2.1
Published
Bar visualizing content reading progress.
Downloads
6
Readme
contentmeter
Simple bar showing progress while reading a content. It supports whole pages and scrollable containers.
Installation
npm i @bezet/contentmeter
Usage
Add styles
<link rel="stylesheet" type="text/css" href="dist/contentmeter.css">
Add JS
Either
import Contentmeter from '@bezet/contentmeter';
const myContentmeter = new Contentmeter({
barSelector: '#content_meter',
contentSelector: '#content_container',
});
or
<script type="text/javascript" src="dist/contentmeter.js"></script>
<script type="text/javascript">
var myContentmeter = new Contentmeter({
barSelector: '#content_meter',
contentSelector: '#content_container',
});
</script>
License
MIT © Bartek Zadara