Groups ====== Group related shapes inside square brackets to draw a labelled container. A group has a name, a body, and a label after the closing bracket: .. sheeptext-example:: :label: A labelled group :alt: A labelled region containing one box Region: [ A1: box "service" with .nw at (120, 100) ] "Region Alpha" fill #1d4ed8 A group with nothing inside still draws its frame. It is sized to hold one box, so a region you have named but not yet filled stays visible, and it takes its place in the flow like any other shape: .. sheeptext-example:: :label: An empty group :alt: A labelled empty region beside a box Region: [ ] "Region Alpha" fill #1d4ed8 Gateway: box "gateway" Groups nest, and each group carries its own label and styling. Names inside a group can be referenced from outside it, for example to draw a line between two regions: .. sheeptext-example:: :label: Nested groups :alt: Two labelled regions connected by a line Campus: [ RegionA: [ A1: box "a1" ] "Region Alpha" fill #1d4ed8 RegionB: [ B1: box "b1" ] "Region Beta" fill #7c3aed ] "Campus Services" fill #0f172a textsize 16 bold L1: RegionA -- RegionB Next: let SheepText place shapes for you with :doc:`layout`.