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

Components to show documents on your site.

    import ElementorexCms.Components

    <.document document={@page.body} />

The document is normalized (see `ElementorexCms.Document.normalize/2`) and
rendered with its stylesheet. Blocks use daisyUI 5 and Tailwind classes, so
your Tailwind build has to scan the library (see the README).

# `document`

Renders a document.

## Attributes

  * `document` - the document map (`nil` renders nothing)
  * `registry` - blocks to use (default `ElementorexCms.Registry.default/0`)
  * `data` - extra data for blocks that need it (`@ctx.data` in the block)
  * `class` - classes for the root element

## Attributes

* `document` (`:map`) - Defaults to `nil`.
* `registry` (`:any`) - Defaults to `nil`.
* `data` (`:map`) - Defaults to `%{}`.
* `mode` (`:atom`) - Defaults to `:public`. Must be one of `:public`, or `:editor`.
* `class` (`:any`) - Defaults to `nil`.

---

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