# `Drafter.Prompt.Frame`
[🔗](https://github.com/jaman/drafter/blob/v0.6.0/lib/drafter/prompt/frame.ex#L1)

What a prompt shows at one moment: lines of styled text and the text cursor's place.

`lines` is a list of `Drafter.Draw.Strip`, top to bottom. `cursor` is `{row, column}`
counted from the frame's first line and first column, or `nil` to hide the cursor.

    iex> alias Drafter.Draw.Strip
    iex> frame = Drafter.Prompt.Frame.new([Strip.from_text("Name: ada")], {0, 9})
    iex> Drafter.Prompt.Frame.text(frame)
    "Name: ada"

# `cursor`

```elixir
@type cursor() :: {non_neg_integer(), non_neg_integer()} | nil
```

# `t`

```elixir
@type t() :: %Drafter.Prompt.Frame{cursor: cursor(), lines: [Drafter.Draw.Strip.t()]}
```

# `new`

```elixir
@spec new([Drafter.Draw.Strip.t()], cursor()) :: t()
```

A frame of `lines` with the cursor at `cursor`, hidden when `cursor` is `nil`.

# `text`

```elixir
@spec text(t()) :: String.t()
```

The frame's text without styling, its lines joined by newlines.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
