Input group

Icon and a result count

A <span> before the input sits at the start; one after it sits at the end. Give icons aria-hidden. The input needs an aria-label or a label.

12 results

Prefix and suffix

Good for prices, weights, percentages or domains. It works inside a .field with a label.

$ USD
kg
https:// .tsunami.shop

Sizes

Each data-size matches the height of an .input and a .btn of the same size.

Ghost in a card header

Emma Wilson · emma.wilson@example.com

Invalid and disabled

Put aria-invalid and disabled on the input. The box follows on its own.

%
Must be 100% or less
$

Attributes

Attribute / element Values Description
.input-group A bordered box around one input and its start/end spans
.input-group > input Borderless input that fills the remaining space. Needs a label or aria-label
.input-group > span Muted text or icon. Placed by HTML order (before the input = start, after = end)
data-size sm, lg (none = default 36px) Same height as .input / .btn
data-variant ghost (none = bordered) No border or background. For card headers or toolbars
aria-invalid true On the input: the box border turns danger
disabled On the input: the box background turns subtle
aria-hidden true On decorative icons in a span