kenburns-editor
v0.1.1
Published
React component to edit a Kenburns effect
Downloads
11
Readme
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)} />