Custom shape library

A shape definition describes the components needed to render a shape. At the most basic level, a shape definition provides the geometry of the shape, which allows Lucidchart to produce path data. More complex shapes can contain sub-shapes that each have their own unique geometry, as well as sub-shapes of their own.

Manifest file

The manifest file defines the name and defaults for your shape:

{ "name": "Test Library", "shapes": [ { "shape": "first", "name": "Test Shape", "defaults": { "aspectRatio": .5, "fillColor": "#ff0000", "link": "your.url.com", "opacity": .5, "rotation": 1.5, "strokeColor": "#00ffff", "strokeWidth": 3, "height": 300, "width": 600 } } ] }

Shape file

Shape files are defined with JSON (or HJSON):

{ "locked": ["aspectRatio"], "images": { "imageReference": { "path": "file", "type": "file", }, }, "geometry": [ { "type": "rect", }, ], "style": { "fill": { "type": "image", "ref": "imageReference", "mode": "stretch", }, }, }

Did this page help you?