# `FrappeUIPhx.Components.ThemeSwitcher`
[🔗](https://github.com/moacirbishopcamata/frappe_ui_phx/blob/v0.3.1/lib/frappe_ui_phx/components/theme_switcher.ex#L1)

Alternador claro/escuro. Cada opção é um link `?theme=…` tratado por
`FrappeUIPhx.Plug.Theme`, que persiste a escolha em sessão e cookie; o tema
atual (`current`) vem do servidor (`@frappe_ui_theme`). Experimental.

# `href`

```elixir
@spec href(String.t(), String.t()) :: String.t()
```

Link relativo que aplica o tema (`"?theme=dark"`).

# `theme_switcher`

## Attributes

* `current` (`:string`) (required) - tema ativo: "light" ou "dark".
* `param` (`:string`) - nome do parâmetro lido pelo Plug. Defaults to `"theme"`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.

---

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