# `LedgerUI.Components.Container`
[🔗](https://github.com/devaction-labs/ledger_ui/blob/v0.2.0/lib/ledger_ui/components/container.ex#L1)

Page containers: `container_fixed/1` centers its content up to the `xl` breakpoint (1280px),
`container_fluid/1` fills the width. Both keep a 24px gutter.

    <.container_fixed>
      <h1>Title</h1>
    </.container_fixed>

The sizing is in the stylesheet (`lu-container-fixed`, `lu-container-fluid`), so a `style` or a
`class` of the caller only adds to it.

## Preview

`preview` draws the canvas diagram of a container instead of a real one: a hatched bar (`lu-cont`) with
the accent span that shows the width of a `size` (`sm` 640px, `md` 768px, `lg` 1024px, `xl` 1280px,
`2xl` 1536px, `prose` 68ch, `full` 100%). `label` and `width` override the text and the span width;
the slot is ignored. For the documentation and the showcase only.

    <.container_fixed preview size="lg" style="flex:1" />

# `container`

A centered container with a gutter, sized by `size`.

    <.container size="lg">...</.container>
    <.container size="prose" class="py-10">...</.container>

## Attributes

* `size` (`:string`) - The widest the content gets: `sm` 640px, `md` 768px, `lg` 1024px, `xl` 1280px, `2xl` 1536px, `prose` 68ch, `full` the parent's width. Without it, as `container_fixed/1`. Defaults to `nil`. Must be one of `nil`, `"full"`, `"2xl"`, `"lg"`, `"md"`, `"prose"`, `"sm"`, or `"xl"`.
* `class` (`:any`) - Defaults to `nil`.
* `style` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block`

# `container_fixed`

A centered container, as wide as the `xl` breakpoint at most.
## Attributes

* `preview` (`:boolean`) - The canvas diagram of a container. Defaults to `false`.
* `size` (`:string`) - With `preview`: the size drawn. Defaults to `nil`. Must be one of `nil`, `"2xl"`, `"full"`, `"lg"`, `"md"`, `"prose"`, `"sm"`, or `"xl"`.
* `label` (`:string`) - With `preview`: the text of the bar. Defaults to `nil`.
* `width` (`:string`) - With `preview`: the width of the bar. Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block`

# `container_fluid`

A container as wide as its parent.
## Attributes

* `preview` (`:boolean`) - The canvas diagram of a container. Defaults to `false`.
* `size` (`:string`) - With `preview`: the size drawn. Defaults to `nil`. Must be one of `nil`, `"2xl"`, `"full"`, `"lg"`, `"md"`, `"prose"`, `"sm"`, or `"xl"`.
* `label` (`:string`) - With `preview`: the text of the bar. Defaults to `nil`.
* `width` (`:string`) - With `preview`: the width of the bar. Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block`

---

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