Libraries
Libraries are Frame0 documents containing components that you can reuse across all documents. This guide explains how to install or uninstall libraries, as well as how to create your own library.
Managing libraries
Installing libraries
Libraries can be installed from the official library registry or by installing a library distributed as a file.
To install a library from the library registry:
- Click Libraries icon from the Shapes View, or select More libraries… in the current library dropdown from the Shapes View.
- Select Registry tab in the Libraries Dialog.
- Find a library to install and click Install button over the library.
To install a library from a file:
- Click Libraries icon from the Shapes View, or select More libraries… in the current library dropdown from the Shapes View.
- Click Install from file button.
- Select a library file to install.
Uninstalling libraries
To uninstall a library:
- Click Libraries icon from the Shapes View, or select More libraries… in the current library dropdown from the Shapes View.
- Select Installed tab in the Libraries Dialog.
- Click the delete button over the library to uninstall.
Creating libraries
A library is a single Frame0 document. Therefore, to create a new library, you need to create a new document and define components within it. Only one page is allowed in a library, and the page’s name becomes the library’s name.
Components
A component is a reusable shape included in a library. Any shape you create can be turned into a component.
To make a component:
- Select a shape.
- Select Expert tab in the Inspector sidebar.
- Turn on Component switch.
If your component requires special behavior, you can use the following features of smart shape of DGM.js.
- Extended properties
- Constraints
- Scripts
- Sizable
- Movable
- Containable filter
- Text editable
- Path editable
- Anchored
- Connectable
Tags
You can assign additional tags to shapes. Tags can be used in scripts, constraints and containable filters.
The following tags can be used for predefined behaviors:
@ungroup
tag ensures that when a component is instantiated, it is automatically ungrouped.
Reference (icon)
You can specify a component to reference another specific shape. Component’s reference designate it’s icon shape. When an icon is specified, the component is displayed as an icon instead of its original component in the Shapes View. If a component is large or complex, assigning an icon helps users recognize it more easily.