# `BB.TUI.Panels.TitleBar`
[🔗](https://github.com/mcass19/bb_tui/blob/v0.3.0/lib/bb/tui/panels/title_bar.ex#L1)

Title bar — single-line branded header at the top of the dashboard.

Renders a rich-text `%Line{}` via `BB.TUI.Theme.brand_title/2`, so
the bot icon, `BB.TUI` brand, robot module, and optional `@ node`
segment each carry their own color and modifier. The whole line
sits over `Theme.title_bg/0` for visual separation from the panels
beneath it.

Pure function — takes state, returns a widget struct.

# `render`

```elixir
@spec render(BB.TUI.State.t()) :: struct()
```

Renders the title bar as a Paragraph widget. The text is the rich
`%Line{}` returned by `BB.TUI.Theme.brand_title/2`; the paragraph
background is `Theme.title_bg/0`.

## Examples

    iex> state = %BB.TUI.State{robot: MyApp.Robot, node: nil}
    iex> %ExRatatui.Widgets.Paragraph{text: %ExRatatui.Text.Line{spans: spans}} =
    ...>   BB.TUI.Panels.TitleBar.render(state)
    iex> Enum.map_join(spans, "", & &1.content)
    " 🤖 BB.TUI · MyApp.Robot"

    iex> state = %BB.TUI.State{robot: MyApp.Robot, node: :"robot@host"}
    iex> %ExRatatui.Widgets.Paragraph{text: %ExRatatui.Text.Line{spans: spans}} =
    ...>   BB.TUI.Panels.TitleBar.render(state)
    iex> Enum.map_join(spans, "", & &1.content) =~ "@ robot@host"
    true

---

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