How to visually group classes without showing a package name?

0 votes
asked Apr 25 in Question / help by dragondive (520 points)

I want to group some classes in my class diagram, without specifying a name for the package. I thought I could adapt the answer given here ( for this purpose.

However, this seems to not work with package style of Rectangle, which I would prefer using here. 

I tried with package dynamic <<Rectangle>> <<Layout>> as well as mentioning packageStyle Rectangle in the package block, but neither seems to work.

I want to avoid the "ugly" protrusion in the grouping shape. Is there a way to achieve this, or another approach to group classes?

PlantUML diagram

skinparam package<<Layout>> {
    borderColor Transparent
    backgroundColor PaleGreen
    fontColor Transparent
    stereotypeFontColor Transparent

  package dynamic <<Layout>>
      class myclass1
      class myclass2

1 Answer

+1 vote
answered Apr 26 by kirchsth (6,240 points)
selected Jul 3 by dragondive
Best answer

If you want a rectangle then the bracket has to be in the same line as the rectangle "rectangle .... {"
(click on the image you see source)

BR Helmut

commented Apr 26 by kirchsth (6,240 points)

If you add a "hide <<Layout>> stereotype" line and set the skinparam "fontSize 0" (of <<Layout>>) too then I think you get what you want.

BR Helmut