# `LedgerUI.Components.ConnectionBanner`
[🔗](https://github.com/devaction-labs/ledger_ui/blob/v0.2.0/lib/ledger_ui/components/connection_banner.ex#L1)

The notice of a lost connection, as a toast: while the LiveView socket is down the toaster shows
a `loading` toast with the ring of light (`aura`), and removes it when the socket is back.

    <.connection_banner />
    <.connection_banner title="Sem conexão" description="Tentando reconectar..." />

Put it once in the root layout, next to the `<.toaster>` (it needs one on the page). It draws
nothing by itself and has no JavaScript of its own: `phx-disconnected` runs `show_toast/2` and
`phx-connected` runs `dismiss_toast/1` (see `LedgerUI.Components.Toast`).

# `connection_banner`

## Attributes

* `id` (`:string`) - Defaults to `"ledger-connection-banner"`.
* `title` (`:string`) - Defaults to `"Connection lost"`.
* `description` (`:string`) - Defaults to `"Trying to reconnect..."`.
* `color` (`:string`) - The light of the ring. Defaults to `"warning"`. Must be one of `"assistant"`, `"primary"`, `"secondary"`, `"info"`, `"success"`, `"warning"`, or `"error"`.
* Global attributes are accepted.

---

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