Skip to main content

I’m trying to use Miro as a frontend for a domain-specific modelling language. As part of this, I have two language features I’m struggling to realize:

  • Image with editable text below.
  • Add icon/shape to the top left corner of an reactangle and treat them as one item.

When I use Miro directly, I can simply group the items and it mostly works:

Only downside of using grouping for this, is that you have to use double clicks to select the sub-item of the grouping and that users can ungroup, but that is managable.

I know grouping is on the roadmap and I’ve already upvoted it.

Nonetheless, I have multiple questions:

  1. Is there any way to create such composite shapes with the current Web SDK or REST API?
  2. Any idea when grouping may become part of the Web SDK or REST API?
  3. Grouping is just a workaround (which I would be happy to use). Ideally, one could directly create composite shapes using parent-child-relations, that cannot be altered by users. Is anything like this planned in the future?

 

 

Hey @Dennis Wolters,

Thanks for reaching out about this, and excellent questions.

At the moment, there’s not a way to group items like you can in the UI, via the API/SDK. However it’s a great suggestion, and something that we’ve heard requested before. 

To answer your questions specifically:

  1. There’s not a single API/SDK call or request to create composite shapes as you’ve described them here, but you can specify positioning for items that are created via the REST API or Web SDK. The position object is included for shapes and other items in both our SDK and API, and allows you to create shapes/items explicitly where you want them. You could also consider placing items within a frame, which allows you to create a child-parent relationship. You can find more details on this here.
  2. We don’t have a concrete answer for this at the moment — however, if you haven’t already and you’re so inclined, I might recommend upvoting this feature request on our developer roadmap here. This helps us to advocate with our Product and Engineering teams 😀
  3. At the moment, the closest option would be to utilize frames, and add children items to the frame. See the second link in point #1 for more details!

I hope this helps to shed some more light on this, but don’t hesitate to let us know if you have additional questions about this!

Best,
Will


Thank you for the quick response, Will.
 

The correct positioning of items is not the problem. I can create the items properly but without grouping the items, users can move them individually of each other, which I would like to avoid. 

Frames are unfortunately no solution since they cannot be connected to other elements. 

As mentioned, I already upvoted grouping in the roadmap. Hopefully the feature will be in one of the next API releases.


Thanks for the prompt reply and for clarifying, Dennis, and understood.

I will continue to advocate for this internally, and hope to have some more concrete updates for you soon. We will be sure to keep this thread up to date as things develop with our Product and Engineering teams on this front.

Best,
Will


Reply