Socket
Socket
Sign inDemoInstall

rc-align

Package Overview
Dependencies
12
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-align

align ui component for react


Version published
Maintainers
4
Weekly downloads
1,264,448
decreased by-10.21%

Weekly downloads

Readme

Source

rc-align


React Align Component. Wrapper around https://github.com/yiminghe/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

nametypedefaultdescription
alignObjectsame with alignConfig from https://github.com/yiminghe/dom-align
onAlignfunction(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/yiminghe/dom-align
monitorWindowResizeBooleanfalsewhether realign when window is resized

License

rc-align is released under the MIT license.

Keywords

FAQs

Last updated on 19 Dec 2022

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