Work with custom shape libraries
Custom shape libraries let you add the shapes, images, clipart, groups of shapes, custom shapes, and even entire diagrams to your own shape library to make diagramming faster and easier.
These custom library files use the
.xml file extension. These files are easily shared with your co-workers.
Create custom shape libraries fill them with corporate assets, like a copyright notice or a logo, or your company’s rack layout, or UML components that are specific to your code base and share your custom libraries with your team members.
You can add custom libraries to the draw.io for Confluence app so that everyone in your company can access your custom shape libraries, or customise the draw.io app to load them by default. This is great for ensuring all diagrams follow your company’s style.
Open a custom shape library
- Click File > Open Library from, then select the service or device where your file is stored.
- Locate and select your custom library (the file extension will be
.xml), then click Choose.
Load a custom library via a URL
You can load a custom library hosted somewhere on the web by using a URL parameter when opening the draw.io editor. Add the
clibs parameter and the address of the custom library with URL encoded characters.
For example, to open the templates.xml custom shape library that is hosted on our GitHub in our online diagram editor, you would use the following URL:
If you want to only open that particular library, you can add a second parameter,
libs=0 to hide the default shape libraries:
Create your own custom shape library
- Click File > New Library > … and select where you want to save your custom library file.
Tip: If you want to use your custom library without loading it next time you create a diagram, you can save it in your browser. However, you will lose it if you clear your browser data - back up the custom libraries you save in your browser to your device or a cloud service.
- Enter a name for your library, and click Save.
Before you save your custom library above, you can add shapes to your library.
- Drag and drop images from your device.
- Click Add Image URL, and paste the URL where your image is stored on the internet.
- Import shapes that have been saved into another custom library
Your custom library will appear at the top of the left panel below the Scratchpad.
Add shapes to your custom library
Drag shapes from the drawing canvas onto your custom library, or select a shape on the canvas and click the plus icon to the right of your library’s name.
You can select multiple shapes or a group of shapes and drag these into your custom library.
Edit and remove shapes
- To remove shapes from your library, click the pencil icon to edit the library, then click the cross in the upper right of the shape you want to remove.
- Rename shapes by clicking on their name and entering a new one.
- Click Save to save your changes.
Export your custom shape library
From here, you can also export your shape library to another location, add images via a URL, and import shapes stored in different shape library.