# `Hypa.Phoenix`
[🔗](https://code.cosmicrose.dev/rosa/hypa)

Functions for using htmx with `Phoenix` applications.

# `assigns`
*since 0.4.0* 

```elixir
@type assigns() :: Keyword.t() | map()
```

A dictionary with the assigns to be used in the view.

# `template`
*since 0.4.0* 

```elixir
@type template() :: binary() | atom()
```

The name of a Phoenix template.

# `render_many`
*since 0.4.0* 

```elixir
@spec render_many(Plug.Conn.t(), [template() | {template(), assigns()}]) ::
  Plug.Conn.t()
```

Renders several templates, concatenating the results.

Elements of the `templates` list can be atoms, strings, or tuples of an
atom/string and a keyword list of assigns, which will be passed to the
template.

This function does _not_ render layouts, because it assumes you're using it
to render htmx out-of-band swaps, which don't need layouts.
This function also assumes that it is rendering HTML.

## Examples

    conn
    |> Hypa.Phoenix.render_many([
      :foo,
      {:bar, [a: 1]},
      {"baz", [b: 2, c: 3]}
    ])

---

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