library / 16

Installation

tokens.css + fine-tune.css + button.css
head.html
<link rel="stylesheet" href="tokens.css">
<link rel="stylesheet" href="components/fine-tune/fine-tune.css">

Basic

fine-tune / Basicinteractive

Inspector card with layout toggles and native range inputs.

Preview card

Layout

Size

Code

fine-tune.html + fine-tune.css
fine-tune
<style>
/* agent-ui / fine-tune — first-class component (promoted from host extracts). */
/* 17 Fine-tune inspector — size via transform scale (no layout transition) */
.au-fine-tune,
.au-finetune {
  background: var(--au-surface);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  display: grid;
  gap: 16px;
  padding: 16px;
}
.au-fine-tune__bar,
.au-finetune__bar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.au-fine-tune__title,
.au-finetune__title { font: 600 14px/1.3 var(--au-font-sans); margin: 0; }
.au-fine-tune__stage,
.au-finetune__stage {
  align-items: center;
  background: var(--au-surface-muted);
  border-radius: var(--au-radius-md);
  display: flex;
  justify-content: center;
  min-height: 7rem;
  overflow: hidden;
}
.au-fine-tune__preview,
.au-finetune__preview {
  background: var(--au-surface);
  border: 1px dashed var(--au-border-color);
  border-radius: calc(var(--au-ft-radius, 12) * 1px);
  height: 64px;
  opacity: calc(var(--au-ft-opacity, 100) / 100);
  transform: scaleX(calc(var(--au-ft-w, 200) / 200)) scaleY(calc(var(--au-ft-h, 64) / 64));
  transform-origin: center;
  transition: transform 120ms ease, opacity 120ms ease, border-radius 120ms ease;
  width: 200px;
}
.au-fine-tune__section,
.au-finetune__section { display: grid; gap: 8px; }
.au-fine-tune__section h4,
.au-finetune__section h4 {
  color: var(--au-fg-muted);
  font: 500 12px/1.2 var(--au-font-sans);
  margin: 0;
  text-transform: uppercase;
}
.au-fine-tune__layouts,
.au-finetune__layouts { display: flex; gap: 8px; }
.au-fine-tune__layouts .au-btn[aria-pressed="true"],
.au-finetune__layouts .au-btn[aria-pressed="true"] {
  background: var(--au-surface-muted);
  color: var(--au-fg);
}
.au-fine-tune__row,
.au-finetune__row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 4rem 1fr 3.5rem;
}
.au-fine-tune__row label,
.au-finetune__row label { color: var(--au-fg-muted); font: 400 12px/1 var(--au-font-sans); }
.au-fine-tune__row input[type="range"],
.au-finetune__row input[type="range"] { width: 100%; }
.au-fine-tune__row input[type="number"],
.au-finetune__row input[type="number"] {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-sm);
  font: 400 12px/1.2 var(--au-font-mono);
  padding: 4px 8px;
  width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  .au-fine-tune__preview,
  .au-finetune__preview { transition: none; }
}
</style>

<p class="fixture-note">Inspector card with layout toggles and native range inputs.</p><div class="au-fine-tune" data-au-component="fine-tune" data-au-state="idle" style="--au-ft-w:200;--au-ft-h:64;--au-ft-radius:12;--au-ft-opacity:100"><div class="au-fine-tune__bar"><h3 class="au-fine-tune__title">Preview card</h3><button type="button" class="au-btn au-btn--ghost au-btn--sm">Adjust</button></div><div class="au-fine-tune__stage"><div class="au-fine-tune__preview" aria-hidden="true"></div></div><div class="au-fine-tune__section"><h4>Layout</h4><div class="au-fine-tune__layouts" role="group" aria-label="Layout"><button type="button" class="au-btn au-btn--ghost au-btn--sm" data-au-layout="row" aria-pressed="true">row</button><button type="button" class="au-btn au-btn--ghost au-btn--sm" data-au-layout="col" aria-pressed="false">col</button></div></div><div class="au-fine-tune__section"><h4>Size</h4><div class="au-fine-tune__row"><label for="fixture-ft-w">W</label><input id="fixture-ft-w" type="range" min="80" max="320" value="200" data-au-ft="w"><input type="number" value="200" aria-label="W value" data-au-ft-num="w"></div></div></div><div hidden><div class="au-fine-tune" data-au-component="fine-tune" data-au-state="running"></div><div class="au-fine-tune" data-au-component="fine-tune" data-au-state="waiting"></div><div class="au-fine-tune" data-au-component="fine-tune" data-au-state="success"></div><div class="au-fine-tune" data-au-component="fine-tune" data-au-state="error"></div><div class="au-fine-tune" data-au-component="fine-tune" data-au-state="cancelled"></div></div>

Component contract

Install
tokens.css · fine-tune.css · button.css
States
Host-owned via data-au-state and documented variants
Host
content, state transitions, and execution behind actions
For agents
fine-tune.contract
# agent-ui / fine-tune
component: fine-tune
selector: .au-fine-tune
data_au_component: fine-tune
purpose: Inspector card with layout toggles and native range inputs.

install:
  - tokens.css
  - fine-tune.css
  - button.css when rendering actions

states: Host-owned via data-au-state and documented variants.
css_variables: Uses shared semantic tokens.
events: native form, focus, and click only — no custom events or runtime required
no_javascript: Markup and native controls remain usable without script.
host_owns: The host owns content, state transitions, and execution behind actions.
accessibility: Prefer labelled regions and text status, not color alone.
security: Escape untrusted model and tool text before insertion.

rules:
  - Host owns execution, authorization, persistence, validation, and state transitions.
  - Components render host-provided state; they never execute tools or imply approval.
  - Escape untrusted model output, tool args, and tool output before insertion.
  - Use only documented data-au-* attributes and data-au-state values.
  - Keep the no-JS path usable. Do not add React, Tailwind, bundlers, or remote assets.
source: components/fine-tune/fine-tune.{html,css} + README.md + fixture.html