@drjaat/react-video-editor
Version:
A React video editor component that can be integrated into any React application
115 lines (87 loc) โข 2.9 kB
Markdown
<p align="center">
<a href="https://github.com/designcombo/react-video-editor">
<img width="150px" height="150px" src="https://cdn.designcombo.dev/logo-white.png"/>
</a>
</p>
<h1 align="center">React Video Editor</h1>
<div align="center">
Video Editor application using React and TypeScript.
<p align="center">
<a href="https://combo.sh/">Combo</a>
ยท
<a href="https://discord.gg/jrZs3wZyM5">Discord</a>
ยท
<a href="https://github.com/designcombo/react-video-editor">X</a>
</p>
</div>
[](https://github.com/designcombo/react-video-editor)
- ๐ฌ Timeline Editing: Arrange and trim media on a visual timeline.
- ๐ Effects and Transitions: Apply visual effects, filters, and transitions.
- ๐ Multi-track Support: Edit multiple video and audio tracks simultaneously.
- ๐ค Export Options: Save videos in various resolutions and formats.
- ๐ Real-time Preview: See immediate previews of edits.
Clone locally:
```bash
git clone git@github.com:designcombo/react-video-editor.git
cd react-video-editor
pnpm install
pnpm dev
```
Open your browser and visit http://localhost:5173 , see more at [Development](https://github.com/designcombo/react-video-editor/react-video-editor).
A powerful video editing component for React applications.
```bash
npm install react-video-editor
yarn add react-video-editor
```
```jsx
import { Editor, ThemeProvider } from 'react-video-editor';
import 'react-video-editor/dist/style.css'; // Import styles
function App() {
const handleSave = (data) => {
console.log('Video project data:', data);
// Save to your backend or localStorage
};
return (
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
<Editor
initialProjectName="My Awesome Video"
onSave={handleSave}
width={1080}
height={1920}
/>
</ThemeProvider>
);
}
export default App;
```
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `initialProjectName` | string | "Untitled video" | Initial name of the project |
| `user` | object | null | User information object |
| `fonts` | array | FONTS | Custom fonts to use in the editor |
| `width` | number | 1080 | Canvas width |
| `height` | number | 1920 | Canvas height |
| `className` | string | "" | Additional CSS classes |
| `onSave` | function | undefined | Callback when project is saved |
You can provide custom fonts to use in the editor:
```jsx
import { Editor, FONTS } from 'react-video-editor';
const customFonts = [...FONTS, {
name: 'My Custom Font',
url: 'https://example.com/my-font.woff2',
category: 'sans-serif'
}];
function App() {
return <Editor fonts={customFonts} />;
}
```
MIT