spmjs

spm@3.x

Brand new static package manager for browser.

Getting Started 󰅴 Packages

rc-align @1.2.1


align ui component for react

spm install rc-align@1.2.1

Version: 1.2.1 ~ stable

Updated 9 years ago
Homepage http://github.com/react-component/align
Repository git@github.com:react-component/align.git
Dependencies rc-util@2.x, dom-align@1.x
Main ./lib/index.js
Tarfile rc-align-1.2.1.tar.gz

rc-align


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

NPM version

Development

npm install
npm start

Example

http://localhost:8100/examples/

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

Feature

Keyboard

install

rc-align

Usage

var Align = require('rc-align');
var React = require('react');
React.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/yiminghe/dom-align
onAlign function(source:HTMLElement, align:Object) called when align
target function():HTMLElement function(){return window;} a function which returned value is used for target from https://github.com/yiminghe/dom-align
monitorWindowResize Boolean false whether realign when window is resized

License

rc-align is released under the MIT license.