# Containers

Everything on the screen is a **container**: a box with attributes, one per line. A container can
hold other containers in `children:`, one per line.

```vi
main main_screen:
  color: gray[100]
  children:
    header:
      size: max, 15
      color: purple[400]
      arrange: center
      children:
        title:
          text: "Containers"
          text_style: 20, white
    body:
      size: max, max
      arrange: center
      children:
        note
    footer

note:
  text: "A container defined on its own, used by name"

footer:
  size: max, 10
  color: purple[100]
```

- A child written inside `children:` (like `header:`) belongs to its parent.
- A child written by name (`note`, `footer`) is a container defined on its own, at the left edge.
  Use that for pieces you show in several places.
- Every container has a name, so you can find it, change it and reach it from code.

Several containers can share one style:

```vi
main row_of_cards:
  arrange: row, spread
  space_inside: 16
  children:
    card_a
    card_b
    card_c

card_a, card_b, card_c:
  size: 30
  color: teal[300]
  shape: rounded
```
