Input

Standalone input

Outside a .field, add class="input" and an aria-label, since there is no visible label. Inside a .field the input gets the same look with no class.

Sizes: sm, default and lg

data-size works on .input and on inputs inside a .field.

Each size beside a button of the same size

An input is as tall as a .btn of the same size (26, 32, 40px), so they line up in a row.

Disabled

File

The browser's file button sits flush inside the border. Use accept and multiple as usual.

Up to 5 MB

With an icon and text beside the input

Use .input-group. A <span> before or after the input sits at the start or end, following the HTML order. See Input group.

12 results

Ghost, for a search field in a card header

data-variant="ghost" has no border or background, so it blends into the card header. An accent border shows on focus.

Product Price
T-shirt $24.00
Tote bag $18.00

Textarea

<textarea class="input"> is at least 5rem tall and can be resized vertically. Set the starting height with rows.

Attributes

Attribute / element Values Description
.input On an input, select or textarea outside a .field. Inputs inside a .field get the same look without it.
data-size sm, lg (none = default 36px) Height 26 / 32 / 40px, matching a .btn of the same size
data-variant ghost (none = bordered) No border or background. Accent border on focus
type="file" File button flush left inside the border
textarea.input At least 5rem tall, resizes vertically
placeholder Muted sample text. Not a replacement for a label
aria-label Required when there is no visible <label>
aria-invalid true Danger border
disabled Subtle background, muted text, cursor not-allowed