npm.io
4.5.0 • Published 6d ago

polotno

Licence
SEE LICENSE IN LICENSE.md
Version
4.5.0
Deps
28
Size
5.7 MB
Vulns
1
Weekly
0

Polotno

Build modern image and video editing apps with a powerful, flexible SDK.

Documentation · Website

Installation

npm install polotno

Quick Start

import React from 'react';
import { PolotnoContainer, SidePanelWrap, WorkspaceWrap } from 'polotno';
import { Toolbar } from 'polotno/toolbar/toolbar';
import { ZoomButtons } from 'polotno/toolbar/zoom-buttons';
import { SidePanel } from 'polotno/side-panel';
import { Workspace } from 'polotno/canvas/workspace';
import { createStore } from 'polotno/model/store';

const store = createStore({
  key: 'YOUR_API_KEY', // get your key at https://polotno.com/cabinet
  showCredit: true,
});
store.addPage();

export const App = () => {
  return (
    <PolotnoContainer style={{ width: '100vw', height: '100vh' }}>
      <SidePanelWrap>
        <SidePanel store={store} />
      </SidePanelWrap>
      <WorkspaceWrap>
        <Toolbar store={store} />
        <Workspace store={store} />
        <ZoomButtons store={store} />
      </WorkspaceWrap>
    </PolotnoContainer>
  );
};

License

See licensing details at polotno.com.

Keywords