Socket
Book a DemoInstallSign in
Socket

react-cropview

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cropview

A React component providing a cropped view for large contents and making it draggable.

0.0.1-alpha.3
latest
Source
npmnpm
Version published
Weekly downloads
23
-41.03%
Maintainers
1
Weekly downloads
 
Created
Source

NPM Package Dependency Status

react-cropview

A React component providing a cropped view for large contents and making it draggable.

Installation

NOTICE: This module is still alpha quality.

npm install --save react-cropview

Example

Please check out example directory.

Usage

It's very simple. Just wrap your content with <CropView> component.

import CropView from 'react-cropview';

// ...

render() {
  return <div>
    <Cropview width={320} height={240}>
      <img src="large.jpg" alt="image" />
    </Cropview>
  </div>:
}

API

<Cropview />

  • name (string):
  • width (string|number) [required] :
  • height (string|number) [required] :
  • constraint (boolean): Prevent over dragging. Default is true.
  • centering (boolean): Centering content in default. Default is true.
  • measureOn (string): hover or mount. Default is mount.

Development

Setup

npm install
npm run build

Start dev server for example

npm start

Open http://localhost:8080/webpack-dev-server/ for auto-reloading. If you want to debug with React Dev Tools, http://localhost:8080/ will be preferred.

Changelog

See the Releases page on GitHub.

License

MIT

Author

Yuki Kodama / @kuy

Keywords

react

FAQs

Package last updated on 23 Feb 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.