JSPM

  • Created
  • Published
  • Downloads 1311621
  • Score
    100M100P100Q202142F
  • License MIT

align ui component for react

Package Exports

  • rc-align
  • rc-align/es/index.js
  • rc-align/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-align) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rc-align


React Align Component. Wrapper around https://github.com/react-component/dom-align.

NPM version build status Codecov gemnasium deps node version npm download

Development

npm install
npm start

Example

http://localhost:8100/examples/

online example: http://react-component.github.io/align/examples/

Feature

  • support ie8,ie8+,chrome,firefox,safari

Keyboard

install

rc-align

Usage

var Align = require('rc-align');
var ReactDOM = require('react-dom');
ReactDOM.render(<Align align={{}} target={function(){}}><div></div></Align>, container);

will align child with target when mounted or align is changed

API

props

name type default description
align Object same with alignConfig from https://github.com/react-component/dom-align
onAlign function(source:HTMLElement, align:Object) called when align
target function():HTMLElement || { pageX: number, pageY: number } || { clientX: number, clientY: number } function(){return window;} a function which returned value or point is used for target from https://github.com/react-component/dom-align
monitorWindowResize Boolean false whether realign when window is resized

License

rc-align is released under the MIT license.