Skip to main content

<DiagramPaletteComponent/>

A shape palette for linking with a DiagramComponent. This component will automatically display the shapes available to the Diagram it is attached to, allowing your users to drag them onto your Diagram, or to click to add.

Usage​

You'll need to declare a DiagramProvider in your JSX, and have the DiagramComponent and DiagramPaletteComponent both be descendants of that element:

import {DiagramProvider, DiagramComponent, DiagramPaletteComponent } from "@visuallyjs/browser-ui-react";

export default function MyApp() {
return <DiagramProvider>
<DiagramComponent options={...}/>
<DiagramPaletteComponent/>
</DiagramProvider>
}

Props​

Sorry - we could not find this document.