# `ElementorexCms.Builder`
[🔗](https://github.com/rocket4ce/elementorex_cms/blob/v0.1.0/lib/elementorex_cms/builder.ex#L1)

Builds documents in Elixir: for templates, seeds and tests.

    import ElementorexCms.Builder

    doc([
      section([
        block("heading", %{text: "Hello", level: "h1"}, style: %{"mobile" => %{"font-size" => "28px"}}),
        block("text", %{text: "<p>Welcome!</p>"}),
        block("button", %{label: "Start", url: "/start", icon: "arrow-right"})
      ])
    ])

Props get the defaults of their block, so only what differs needs to be given.
Pass `registry:` to build with a custom registry.

# `block`

```elixir
@spec block(String.t(), map() | keyword(), keyword()) :: map()
```

A node of `type`. Options: `:id`, `:children`, `:style` (per state), `:attrs`
(*Advanced* settings) and `:registry`.

# `columns`

A grid whose columns are the given lists of children (one container per column).

# `container`

A flex container with these children.

# `doc`

```elixir
@spec doc([map()], keyword()) :: ElementorexCms.Document.t()
```

A document with these root children.

# `section`

A section with these children.

---

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