# `Macaw.Builtin.ThemeSwitch`
[🔗](https://github.com/dcoai/macaw/blob/v0.6.0/lib/macaw/builtin/theme_switch.ex#L1)

The built-in theme switch (spec/05 §6.7), `"macaw.theme_switch"`: a choice of the
viewer's theme, of kind `:control`, `:pure` (#452).

  * **parameters:** `label` (text, `"Theme"`), its select's label; `none` (text,
    `"Default"`), the words of the option for no theme, the host's, `""` for no such
    option;
  * **declarations:** the event `"theme"`, its value the theme's name; its placement's
    action sets the `theme` preference, `%{on: "theme", set: "theme", value: {:event,
    :value}}`, which rendering applies by itself (spec/03 §1.7.3);
  * **choices** (`Macaw.Control`): its options are the registry's themes, by name;
  * **markup:** a labeled native `<select>`, as the filter's (`Macaw.Builtin.Filter`);
  * **stylesheet:** `stylesheet/0`, the controls' own, served at `stylesheet_path/0`.

# `stylesheet`

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

The theme switch's one static stylesheet, the controls' own (the shared controls sheet).

# `stylesheet_path`

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

The stylesheet's path, its content address (`Macaw.Component.Stylesheet.path/1`).

---

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