Socket
Socket
Sign inDemoInstall

dom-scroll-into-view

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dom-scroll-into-view

scroll dom node into view automatically


Version published
Weekly downloads
277K
decreased by-20.02%
Maintainers
1
Install size
132 kB
Created
Weekly downloads
 

Readme

Source

dom-scroll-into-view


scroll node in contain to make node visible

NPM version npm download

install

dom-scroll-into-view

Usage

import scrollIntoView from 'dom-scroll-into-view';
scrollIntoView(source,container,config);

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://yiminghe.github.io/dom-scroll-into-view/

function parameter

nametypedefaultdescription
sourceHTMLElementnode wanted to show
containerHTMLElement
config.alignWithLeftBooleanwhether align with left edge
config.alignWithTopBooleanwhether align with top edge
config.offsetTopNumber
config.offsetLeftNumber
config.offsetBottomNumber
config.offsetRightNumber
config.allowHorizontalScrollBooleanwhether allow horizontal scroll container
config.onlyScrollIfNeededBooleanwhether scroll container when source is visible

License

dom-scroll-into-view is released under the MIT license.

Keywords

FAQs

Last updated on 12 Aug 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc