0.0.6 • Published 10 years ago

hmhyr v0.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

HMHYR - Reading progress-bar component for React

Simple components for display reading progress, using .getBoundingClientRect() to calculate position relative to viewport

Demo

Live demo.

Installation

npm install hmhyr --save-dev

Usage

import HMHYR from 'hmhyr';
<HMHYR
  area
  style
  overlayStyle
  target
  static
  title
/>
OptionTypeDefaultDescription
areaobject{ top: '20%', center: '50%', bottom: '60%' }Progress bar will display if target is in area limit by area.top and area.bottom. Area.center is the point where counter start. All in percentage, relative to viewport, 1% = 1vh
styleobjectDefault styling.Use style because of CSS specificities problem. Recommended, default style is crap :(.
overlayStyleobjectDefault styling.Style use for overlay bar
targetstringEither use target id to determine target or use HMHYR as wrapper of target.
timeCounterNoneIf exist, progress bar will have a estimated read time.
staticNone.If exist, progress bar background will stay even if target outside valid area ,require style.height value being set.
titlestringNone.Title for being display on progress-bar.

TODO

  • Add support for multiple target per component.
  • Built-in theme.
  • Write unit test.
  • Other position than 'fixed'.

License

HMHYR is available under MIT. See LICENSE for more details.

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago