offset-scroll

1.0.2 • Public • Published

Simple component displaying a list of item and allowing selection of the initial scroll position (as an index of the item list)

Props

  • offset: number of the item to scroll the component to (0-based)
  • elementHeight: height per item (currently only supports all items of same height)
  • className: container class name

This will only scroll if the component is sufficiently constrained in height. If offset is pointing to last item in the list then we'll scroll to the bottom of the list, but we won't add some blank space to put that item to the top.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i offset-scroll

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • nicocrm