# `Brix.Render`
[🔗](https://github.com/LoamStudios/brix/blob/main/lib/brix/render.ex#L1)

Render helpers for Phoenix LiveView. Dispatches sections to
your app's function components by template name.

# `child_sections`

Renders child sections for a specific field. Use inside section components
to render nested sections.

## Example

    def gallery(assigns) do
      ~H"""
      <div class="gallery">
        <h2>{@fields["title"]}</h2>
        <Brix.Render.child_sections module={@module} children={@children} field="slides" />
      </div>
      """
    end

## Attributes

* `module` (`:atom`) (required)
* `children` (`:map`) (required)
* `field` (`:string`) (required)

# `layout`

Renders a layout by dispatching its header sections, yielding the inner block,
then dispatching its footer sections.

## Attributes

* `layout` (`:map`) (required)
* `module` (`:atom`) (required)
## Slots

* `inner_block` (required)

# `media_url`

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

Resolves a media slug to its serving path.

# `render_section`

Renders a single section by dispatching to the matching function component
in `module`. Passes `@fields`, `@children`, and `@module` as assigns.

# `sections`

Renders a list of sections by dispatching each to the corresponding
function component in `module`. The component function name matches
the section's template name.

## Attributes

* `sections` (`:list`) (required)
* `module` (`:atom`) (required)

---

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