# Screens

The `main` container is the first screen. Every other screen is a container you open with
`go_to(name)`; `go_back()` returns. Screens fill the phone and stay clear of the notch and the
keyboard by themselves.

```vi
tasks = [{ name: "Buy milk", note: "Two litres" }, { name: "Call Sam", note: "About Friday" }]

main home:
  space_inside: 24
  space_between: 12
  children:
    first:
      button: tasks[0].name
      on_tap: go_to(details(tasks[0]))
    second:
      button: tasks[1].name
      on_tap: go_to(details(tasks[1]), fade)
    settings_button:
      button: "Settings"
      on_tap: go_to(settings, slide)

details(task):
  space_inside: 24
  space_between: 12
  children:
    title:
      text: task.name
      text_style: 28, bold
    note:
      text: task.note
    back:
      button: "Back"
      on_tap: go_back()

settings:
  arrange: center
  children:
    label:
      text: "Settings"
    back:
      button: "Back"
      on_tap: go_back()
```

- `go_to(details(task))` opens a screen that **takes a value** (lesson **Containers that take values**).
- The second value picks the change: `slide`, `fade` or `none`. The default is the phone's own slide.
- `phone`, `tablet` and `desktop` are `true` on that size of screen:
  `arrange: row if (tablet) else column`.
