Skip to content
A React component for resizing HTML elements.
Branch: master
Clone or download
Latest commit 83dfde6 Mar 20, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Init commit Jul 18, 2016
src add preventDefault. It should fix problems with text dragging. Mar 20, 2017
test remove question mark. Fix specs Jul 18, 2016
.gitignore Init commit Jul 18, 2016
.npmignore Init commit Jul 18, 2016
.travis.yml
LICENSE.md Init commit Jul 18, 2016
README.md Init commit Jul 18, 2016
package.json
webpack.config.coffee Init commit Jul 18, 2016

README.md

React Resizer

React Resizer example

A React component for resizing HTML elements.

Installation:

npm install react-resizer

Usage:

For a more comprehensive use case, please check the example folder in this repository.

'use strict';

let React = require('react');
let Resizer = require('react-resizer');

let App = React.createClass({
  displayName: 'App',
  
  _handleResize: function(diff) {
    return console.log('resizing');
  },
  
  _handleResizeStart: function() {
    return console.log('resize start');
  },
  
  _handleResizeEnd: function() {
    return console.log('resize end');
  },
  
  render: function() {
    return (
      <Resizer
        onResizeStart={this._handleResizeStart}
        onResize={this._handleResize}
        onResizeEnd={this._handleResizeEnd}
      >
        <div>Right sidebar</div>
      </Resizer>
    )
  }
});

React.render(<App />, document.getElementById('content'));
You can’t perform that action at this time.