scroll dom node into view automatically
npm install dom-scroll-into-viewscroll node in contain to make node visible
[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[npm-image]: http://img.shields.io/npm/v/dom-scroll-into-view.svg?style=flat-square
[npm-url]: http://npmjs.org/package/dom-scroll-into-view
[travis-image]: https://img.shields.io/travis/react-component/dom-scroll-into-view.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/dom-scroll-into-view
[coveralls-image]: https://img.shields.io/coveralls/react-component/dom-scroll-into-view.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/react-component/dom-scroll-into-view?branch=master
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/dom-scroll-into-view.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/react-component/dom-scroll-into-view
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/dom-scroll-into-view.svg?style=flat-square
[download-url]: https://npmjs.org/package/dom-scroll-into-view

``js`
import scrollIntoView from 'dom-scroll-into-view';
scrollIntoView(source,container,config);Development
```
npm install
npm start
http://localhost:8000/examples/
online example: http://yiminghe.github.io/dom-scroll-into-view/
| name | type | default | description |
|---|---|---|---|
| source | HTMLElement | node wanted to show | |
| container | HTMLElement | ||
| config.alignWithLeft | Boolean | whether align with left edge | |
| config.alignWithTop | Boolean | whether align with top edge | |
| config.offsetTop | Number | ||
| config.offsetLeft | Number | ||
| config.offsetBottom | Number | ||
| config.offsetRight | Number | ||
| config.allowHorizontalScroll | Boolean | whether allow horizontal scroll container | |
| config.onlyScrollIfNeeded | Boolean | whether scroll container when source is visible |
dom-scroll-into-view is released under the MIT license.