Skip to the page
TACTILE UI

Kit part · Forms · Inputs · Search bars · Selects

Combo

One field with its one action in a shared well: subscribe, search, add.

Element
<input> + <button>
Needs
kit.css
Rules
field.rules.md · 5
Finishes
Aluminium · Graphite · Porcelain · Black
Volumes
Tactile · Quiet
On this page
  1. Variants
  2. Every state, at once
  3. API
  4. Markup
  5. Accessibility
  6. How it’s built
  7. Rules
  8. Related parts
01

Variants

Search with a plain key
Add with the contrast key
02

Every state, at once

Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.

Aluminium

PartRestFocusError
Combo
Add the domain.

Graphite

PartRestFocusError
Combo
Add the domain.
03

API

NameKindValuesWhat it does
.tui-comboclass—One well, 4px inside, holding an input and a key.
.tui-inputclassinsideLoses its own recess and sits flush in the shared well.
.tui-keyclassinside36px, to fit the well. Plain or --primary.
data-errorattributeon a .tui-field around itRed hairline on the whole well.
Enterkeyboard—Put it in a <form> and Enter submits, as native.
04

Markup

<div class="tui-field">
  <label class="tui-label" for="sub">Subscribe</label>
  <div class="tui-combo">
    <input class="tui-input" id="sub" type="email" placeholder="[email protected]">
    <button class="tui-key tui-key--primary">Subscribe</button>
  </div>
</div>

Needs kit.css only, no script. How to install the kit.

05

Accessibility

  • The input still needs its own name: a <label for> or aria-label.
  • Put it in a <form> so Enter works and the key is a real submit.
  • Focus rings the whole well through :has(:focus-visible).
06

How it’s built

A flex row with the kit’s recess on the wrapper. The input inside drops its own shadow and background, so the cut reads as one; the key keeps its skirt and sits on the well’s floor. The ring uses :has(), so no script.

07

Rules

field.rules.mdIn the brain

One field and its one action; the action may be the contrast key.

5 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.

08

Field

Text entry in a recess, the label printed above it, and a hint that says how to fix an error.

Key

Every button, and every link that acts like one: a cap on a skirt that drops below the plate when pressed.

Stepper

A small integer with − and + keys either side, in one well.

Docs
Finish
Volume