Remove side panel

How to remove the side panel?

You can control side panels in Polotno SDK. You can remove some of the panels if you don't need them in your app.
Here is the code sample:

import { SidePanel, DEFAULT_SECTIONS } from 'polotno/side-panel';

// first you can log all sections into console to see what sections are defined
const names = DEFAULT_SECTIONS.map((section) => section.name);
console.log(names);

// if you don't need a specific section, you can remove it by its name
// let's remove upload section
const sections = DEFAULT_SECTIONS.filter(
  (section) => section.name !== 'upload'
);

export const App = () => {
  return (
    <PolotnoContainer className="polotno-app-container">
      <SidePanelWrap>
        <SidePanel store={store} sections={sections} />
      </SidePanelWrap>
      <WorkspaceWrap>
        <Toolbar store={store} downloadButtonEnabled />
        <Workspace store={store} />
        <ZoomButtons store={store} />
        <PagesTimeline store={store} />
      </WorkspaceWrap>
    </PolotnoContainer>
  );
};

News, updates and promos – be the first to get 'em

News, updates and promos – be the first to get 'em