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

Joins inputs, addons, selects and buttons into one row with shared borders.

    <.input_group>
      <.input_group_addon>R$</.input_group_addon>
      <.input name="amount" variant="plain" />
      <.input_group_addon>,00</.input_group_addon>
    </.input_group>

    <.input_group label="Price" size="sm" errors={["must be positive"]}>
      <.input_group_addon variant="filled">$</.input_group_addon>
      <.input name="amount" variant="plain" size="sm" state="error" />
    </.input_group>

The row is a `role="group"` named by the caption (`aria-labelledby`; give each group an `id`
when two share a label). With `errors` (or `state="error"`) every border of the row turns red,
and the row gets `aria-invalid` and an `aria-describedby` that points at the messages.

The group draws the shared border, so an `input/1` inside it takes `variant="plain"`.

# `input_group`

Renders the row; `label` adds a caption above it, `help` and `errors` a line below.
## Attributes

* `id` (`:string`) - Defaults to `nil`.
* `shape` (`:string`) - Defaults to `"rounded"`. Must be one of `"rounded"`, or `"pill"`.
* `size` (`:string`) - Defaults to `"md"`. Must be one of `"sm"`, `"md"`, or `"lg"`.
* `variant` (`:string`) - Defaults to `"outlined"`. Must be one of `"outlined"`, or `"filled"`.
* `label` (`:string`) - Defaults to `nil`.
* `label_class` (`:any`) - Defaults to `nil`.
* `help` (`:string`) - Defaults to `nil`.
* `errors` (`:list`) - Defaults to `[]`.
* `state` (`:string`) - Defaults to `nil`.Must be one of `nil`, `""`, `"success"`, or `"error"`.
* `wrapper_class` (`:any`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block` (required)

# `input_group_addon`

A text or icon box at either end (or between the inputs) of an `input_group`.
## Attributes

* `variant` (`:string`) - Defaults to `"outline"`. Must be one of `"outline"`, or `"filled"`.
* `size` (`:string`) - Defaults to `"md"`. Must be one of `"sm"`, `"md"`, or `"lg"`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `inner_block` (required)

---

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