# InputGroup (@limerdev/zest) A text field with addons inside its box: an icon, a unit or prefix, a button. `` holds one control, an `InputGroup.Input` or `InputGroup.Textarea` (in a `Field`, labelled and described by it), and `InputGroup.Addon`s (`align`: `inline-start`, `inline-end`, `block-start`, `block-end`) holding icons, `InputGroup.Text` or `InputGroup.Button`s. The group draws the box, its focus ring and its invalid state; clicking an addon's text focuses the control. - Category: Data input - Import: `import { InputGroup } from '@limerdev/zest'` - Exports: `InputGroup.Root`, `InputGroup.Addon`, `InputGroup.Text`, `InputGroup.Input`, `InputGroup.Textarea`, `InputGroup.Button` - Use for: A search field with an icon, an amount with its currency, a URL with its scheme, a secret with a copy or show button, a message box with a send button under it. - Don't: A plain input: use `Input`. A choice from a list: use `Select` or `Combobox`. An addon that is the only label: give the field a `Field.Label` or `aria-label`. ```svelte Amount kr ``` Props of `InputGroup.Addon`: - `align` (`"inline-start" | "inline-end" | "block-start" | "block-end"`, default `'inline-start'`): Where it sits: before or after the control on its line (`inline-start`, `inline-end`), or above or below it (`block-start`, `block-end`). Props of `InputGroup.Input`: - `files` (`FileList | null`, bindable): The chosen files, for `type="file"`. Bindable. - `value` (`string | number | null`, bindable): The text, or a number for `type="number"`. Bindable. Props of `InputGroup.Textarea`: - `value` (`string | null`, bindable): The text. Bindable. Props of `InputGroup.Button`: - `disabled` (`null | false | true`) - `href` (`string | null`) - `loading` (`boolean`, default `false`): Waiting for the action it started: a spinner shows (in place of the icon of an `icon`-size button), it is marked busy and unavailable, and clicks do nothing. Unlike `disabled`, it keeps keyboard focus. - `size` (`"default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg"`, default `'sm'`): The height and padding, from the theme's field size; the `icon` sizes are square. - `type` (`null | "button" | "submit" | "reset"`) - `variant` (`"link" | "primary" | "secondary" | "neutral" | "error" | "outline" | "ghost"`, default `'ghost'`): The look, by the theme's colour roles: `primary` for the main action, `error` for deleting, `secondary`, `neutral` and `outline` for the rest, `ghost` in toolbars, `link` for a navigation that looks like text. Example: Addons An icon, a unit, a prefix: addons sit inside the field's box, before or after the input. ```svelte
Amount kr Website https://
``` Example: Buttons Buttons in addons: show a secret, or send a message from under its text area. ```svelte
API key (shown = !shown)} > {#if shown}{:else}{/if} Message Sent by email Send
```