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

A group of fields under a small title, laid out in a grid.

    <.form_section title="Contato">
      <.input field={@form[:email]} label="E-mail" />
      <.input field={@form[:phone]} label="Telefone" />
    </.form_section>

    <.form_section title="Endereco" description="Usado na NF-e" layout="aside" columns={3}>
      <.input field={@form[:zip]} label="CEP" />
    </.form_section>

`stacked` (default) puts the title over the fields and closes the section with a line
(`divider={false}` drops it); `aside` puts the title and description in a column at the left.
The fields go in `columns` columns (two by default). The `:action` slot sits at the right of a
stacked title.

# `form_section`

Renders a form section; the inner block is its fields.
## Attributes

* `title` (`:string`) (required)
* `description` (`:string`) - Defaults to `nil`.
* `layout` (`:string`) - Defaults to `"stacked"`. Must be one of `"stacked"`, or `"aside"`.
* `variant` (`:string`) - The same as `layout`; it wins when given. Defaults to `nil`. Must be one of `nil`, `"stacked"`, or `"aside"`.
* `columns` (`:integer`) - Defaults to `2`. Must be one of `1`, `2`, or `3`.
* `divider` (`:boolean`) - On by default for `stacked`, off for `aside`. Defaults to `nil`.
* `id` (`:string`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `action` - At the right of a stacked title (a link, a toggle).
* `inner_block` (required)

---

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