Nietzsche's Preposterous Moustache
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

kenburns-editor

0.1.1 • Public • Published

kenburns-editor

Usages

// ES6
import { KenburnsEditor } from "kenburns-editor";
// CommonJS
var KenburnsEditor = require("kenburns-editor").KenburnsEditor;

kenburns-editor allows to be Controlled: you have to provide values and an onChange handler to enable the edition.

<KenburnsEditor
  image="1.jpg"
  value={this.state.value}
  onChange={value => this.setState({ value })} />

kenburns-editor allows to be Uncontrolled: just define a defaultValues:

<KenburnsEditor
  image="1.jpg"
  defaultValue={{ from: [0.5, [0.5, 0.5]], to: [1, [0.5, 0.5]] }}
  onChange={console.log.bind(console)} />

Example

(click to open)

Used by...

Install

npm i kenburns-editor

DownloadsWeekly Downloads

5

Version

0.1.1

License

ISC

Last publish

Collaborators

  • avatar