@itershukov/react-timeline-editor
v2.1.2
Published
[![npm version](https://img.shields.io/npm/v/@itershukov/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@itershukov/react-timeline-editor) [![npm downloads](https://img.shields.io/npm/dm/@itershukov/react-timeline-editor.svg?s
Downloads
184
Maintainers
Readme
React Timeline Editor
React Timeline Editor is a react component used to quickly build a timeline animation editor.
Getting Started
npm install @itershukov/react-timeline-editor
import { Timeline, TimelineEffect, TimelineRow } from '@itershukov/react-timeline-editor';
import React from 'react';
const mockData: TimelineRow[] = [{
id: "0",
actions: [
{
id: "action00",
start: 0,
end: 2,
effectId: "effect0",
},
],
},
{
id: "1",
actions: [
{
id: "action10",
start: 1.5,
end: 5,
effectId: "effect1",
}
],
}]
const mockEffect: Record<string, TimelineEffect> = {
effect0: {
id: "effect0",
name: "效果0",
},
effect1: {
id: "effect1",
name: "效果1",
},
};
const TimelineEditor = () => {
return (
<Timeline
editorData={mockData}
effects={mockEffect}
/>
);
};
Documention
Checkout the Docs for a demonstration of some basic and advanced features.