Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-resizable-box

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resizable-box

Resizable component for React.

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
601
decreased by-58.95%
Maintainers
1
Weekly downloads
 
Created
Source

react-resizable-box

Resizable component for React.

Build Status Code Climate License

Demo

See demo: http://bokuweb.github.io/react-resizable-box/example/

Important Note

This is an alpha release. Use with caution and hope.

Installation

npm i react-resizable-box

Overview

Basic

<Resizable customClass="item"
           width={320}
           height={200}>
  Basic Sample
</Resizable>

With min/max width/height

<Resizable customClass="item"
           width={320}
           height={200}
           minWidth={160}
           minHeight={160}
           maxWidth={480}
           maxHeight={480} >
  min size is 160x160, max size is 480px x 480px.
</Resizable>

Properties

width {number}

The default width of the resizable box.

height {number}

The default height of the resizable box.

minWidth {number}

The minimum width of the resizable box.

minHeight {number}

The minimum height of the resizable box.

maxWidth {number}

The maximum width of the resizable box.

maxHeight {number}

The maximum height of the resizable box.

customClass {string}

The css class set on the resizable box node.

customStyle {object}

The css style set on the resizable box node.

isResizable {object}

The permission of x, y, xy direction resizing.
If omitted, x, y, xy direction resizing is enabled.
If you want to permit only x direction resizing, set {x:true, y:false, xy:false}.

onClick {func}

Callback called on resizable box clicked.

onTouchStart {func}

Callback called on resizable box touched.

onDoubleClick {func}

Callback called on resizable box double clicked.

onResizeStart {func}

Callback called on resize start.
Receives the resize direction as argument.

onResize {func}

Callback called on resizing.
Receives the box size {width, height} as argument.

onResizeStop {func}

Callback called on resize stop.

Test

npm test

License

The MIT License (MIT)

Copyright (c) 2015 @Bokuweb

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 25 Nov 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc