{"_id":"rmc-align","_rev":"3760168","name":"rmc-align","description":"react align ui component for mobile","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"silentcloud","email":"rjmuqiang@gmail.com"}],"time":{"modified":"2025-05-06T07:41:46.000Z","created":"2017-09-21T03:25:38.764Z","1.0.0":"2017-09-21T03:25:38.764Z"},"users":{},"author":"","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/m-align.git"},"versions":{"1.0.0":{"name":"rmc-align","version":"1.0.0","description":"react align ui component for mobile","keywords":["react","react-component","react-align","align","mobile align"],"files":["lib","es","dist"],"homepage":"http://github.com/react-component/m-align","author":"","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/m-align.git"},"bugs":{"url":"http://github.com/react-component/m-align/issues"},"licenses":"MIT","main":"./lib/index","module":"./es/index","config":{"port":8100},"scripts":{"dist":"rc-tools run dist","watch-tsc":"rc-tools run watch-tsc","build":"rc-tools run build","gh-pages":"rc-tools run gh-pages","start":"rc-tools run server","pub":"rc-tools run pub","lint":"rc-tools run lint","compile":"rc-tools run compile --babel-runtime","karma":"rc-test run karma","saucelabs":"rc-test run saucelabs","test":"rc-test run test","chrome-test":"rc-test run chrome-test","coverage":"rc-test run coverage"},"devDependencies":{"@types/react":"~16.0.2","@types/react-dom":"15.5.1","expect.js":"0.3.x","pre-commit":"1.x","rc-tools":"6.x","rc-test":"6.x","react":"15.x","react-dom":"15.x"},"pre-commit":["lint"],"typings":"./lib/index.d.ts","dependencies":{"babel-runtime":"6.x","dom-align":"1.x","rc-util":"4.x"},"gitHead":"8a00db37b5add8b176a954be388a92a7658c9a63","_id":"rmc-align@1.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.3","_npmUser":{"name":"silentcloud","email":"rjmuqiang@gmail.com"},"dist":{"shasum":"8d64ab484609a041ab424506012a15b7c5b933dd","size":5069,"noattachment":false,"key":"/rmc-align/-/rmc-align-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rmc-align/download/rmc-align-1.0.0.tgz"},"maintainers":[{"name":"silentcloud","email":"rjmuqiang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rmc-align-1.0.0.tgz_1505964338702_0.34344956604763865"},"directories":{},"publish_time":1505964338764,"_hasShrinkwrap":false,"_cnpm_publish_time":1505964338764,"_cnpmcore_publish_time":"2021-12-16T16:33:31.218Z"}},"readme":"# rmc-align\n---\n\nReact Align Component. Wrapper around https://github.com/yiminghe/dom-align.\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/rmc-align.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rmc-align\n[travis-image]: https://img.shields.io/travis/react-component/m-align.svg?style=flat-square\n[travis-url]: https://travis-ci.org/react-component/m-align\n[coveralls-image]: https://img.shields.io/coveralls/react-component/m-align.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/m-align?branch=master\n[gemnasium-image]: http://img.shields.io/gemnasium/react-component/m-align.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/react-component/m-align\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/rmc-align.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rmc-align\n\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8100/examples/\n\nonline example: http://react-component.github.io/align/examples/\n\n\n## Feature\n\n* support ie8,ie8+,chrome,firefox,safari\n\n### Keyboard\n\n\n\n## install\n\n[![rmc-align](https://nodei.co/npm/rmc-align.png)](https://npmjs.org/package/rmc-align)\n\n## Usage\n\n```js\nvar Align = require('rmc-align');\nvar ReactDOM = require('react-dom');\nReactDOM.render(<Align align={{}} target={function(){}}><div></div></Align>, container);\n```\n\nwill align child with target when mounted or align is changed\n\n## API\n\n### props\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>align</td>\n          <td>Object</td>\n          <td></td>\n          <td>same with alignConfig from https://github.com/yiminghe/dom-align</td>\n        </tr>\n        <tr>\n          <td>onAlign</td>\n          <td>function(source:HTMLElement, align:Object)</td>\n          <td></td>\n          <td>called when align</td>\n        </tr>\n        <tr>\n          <td>target</td>\n          <td>function():HTMLElement</td>\n          <td>function(){return window;}</td>\n          <td>a function which returned value is used for target from https://github.com/yiminghe/dom-align</td>\n        </tr>\n        <tr>\n          <td>monitorWindowResize</td>\n          <td>Boolean</td>\n          <td>false</td>\n          <td>whether realign when window is resized</td>\n        </tr>\n    </tbody>\n</table>\n\n\n## License\n\nrmc-align is released under the MIT license.\n","_attachments":{},"homepage":"http://github.com/react-component/m-align","bugs":{"url":"http://github.com/react-component/m-align/issues"}}