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.
Summary
Functions
A node of type. Options: :id, :children, :style (per state), :attrs
(Advanced settings) and :registry.
A grid whose columns are the given lists of children (one container per column).
A flex container with these children.
A document with these root children.
A section with these children.
Functions
A node of type. Options: :id, :children, :style (per state), :attrs
(Advanced settings) and :registry.
A grid whose columns are the given lists of children (one container per column).
A flex container with these children.
@spec doc([map()], keyword()) :: ElementorexCms.Document.t()
A document with these root children.
A section with these children.