askvity

Adding Shapes to Your Custom Library in draw.io

Published in Draw.io Custom Shapes 2 mins read

You can easily add shapes already on your canvas to a custom library in draw.io (now diagrams.net) for future use.

Creating a custom library of shapes allows you to reuse frequently used or custom-designed elements across different diagrams. Instead of importing shape files directly in this specific method, you add shapes that you have already placed or created on your drawing canvas into your personal collection.

Based on the provided reference, there are two primary ways to add existing shapes from your draw.io canvas to a custom library:

Method 1: Drag and Drop

This is a straightforward visual method:

  1. Select the shape(s) on your drawing canvas that you want to add to your library. You can select a single shape, multiple individual shapes, or even a group of shapes.
  2. Drag the selected shape(s) directly from the drawing canvas area onto the panel where your custom library is displayed.
  3. Drop the shape(s) into your custom library. They will appear there as new entries.

Method 2: Using the Plus Icon

This method involves selecting the shapes first and then using a dedicated button:

  1. Select the shape(s) on your drawing canvas. Just like with dragging, you can select single shapes, multiple shapes, or a group.
  2. Navigate to the header or title area of your custom library in the shape panel.
  3. Click the plus icon (+) located to the right of your custom library's name.
  4. The selected shape(s) will be added to that custom library.
Method Action on Canvas Action on Library Panel Supports Multiple/Group Selection
Drag & Drop Select Shape(s) Drag & Drop into Library Yes
Plus Icon Select Shape(s) Click + next to Library Name Yes

Both methods effectively allow you to populate your custom libraries with shapes you've used or created on your canvas, making them readily available for drag-and-drop into future diagrams.

Related Articles