How to use react-avatar-editor - 1 common examples

To help you get started, we’ve selected a few react-avatar-editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kitspace / kitspace / src / settings / custom_avatar_editor.jsx View on Github external
const React             = require('react')
const ReactAvatarEditor = require('react-avatar-editor').default
const semantic          = require('semantic-ui-react')

class CustomAvatarEditor extends React.Component {
  state = {
    position: { x: 0.5, y: 0.5 },
    scale: 1,
    rotate: 0,
    borderRadius: 0,
    width: 200,
    height: 200
  }

  handleScale = (e) => {
    const scale = parseFloat(e.target.value)
    this.setState({ scale })
  }

react-avatar-editor

Avatar / profile picture component. Resize and crop your uploaded image using a intuitive user interface.

MIT
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis

Popular react-avatar-editor functions