Installation
tokens.css + loading-state.css + host-chrome.csshead.html
<link rel="stylesheet" href="tokens.css">
<link rel="stylesheet" href="components/loading-state/loading-state.css">Mark
Thinking…
Code
loading-state.html + loading-state.css
loading-state
<style>
/* agent-ui / loading-state — first-class component (promoted from host extracts). */
/* ===== host composition (host chrome; compose MVP) ===== */
/* 01 Loading variants: Drive / Dots / Orbit + elapsed */
.au-loading,
.au-loading-state {
align-items: center;
display: flex;
flex-direction: column;
gap: 12px;
justify-content: center;
min-height: 8rem;
padding: 24px;
text-align: center;
}
.au-loading__label {
color: var(--au-fg);
font: 500 14px/1.3 var(--au-font-sans);
}
.au-loading__time {
color: var(--au-fg-subtle);
font: 400 12px/1 var(--au-font-mono);
font-variant-numeric: tabular-nums;
}
.au-loading__variants {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 8px;
}
.au-loading__variants .au-btn[aria-pressed="true"] {
background: var(--au-surface-muted);
color: var(--au-fg);
}
.au-loading[data-au-variant="dots"] .au-loading__mark { display: none; }
.au-loading[data-au-variant="dots"] .au-thinking-indicator { display: inline-flex; }
.au-loading:not([data-au-variant="dots"]) .au-thinking-indicator { display: none; }
.au-loading__mark {
--au-load-size: 28px;
color: var(--au-action);
height: var(--au-load-size);
position: relative;
width: var(--au-load-size);
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-load-drive 1.1s linear infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 33% 33%,
linear-gradient(currentColor 0 0) 50% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 100% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 0 50% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 0 100% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 100% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 100% / 33% 33%;
background-repeat: no-repeat;
content: "";
display: block;
height: 100%;
opacity: 0.85;
width: 100%;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
border: 2px solid color-mix(in srgb, var(--au-action) 35%, transparent);
border-radius: 50%;
content: "";
inset: 0;
position: absolute;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
animation: au-load-orbit 0.9s linear infinite;
border-color: var(--au-action) transparent transparent transparent;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after { animation: none; }
/* ===== host composition detail chrome (per-component pages only) ===== */
/* Pixel-grid Drive mark closer to host composition */
.au-loading[data-au-variant="drive"] .au-loading__mark {
--au-load-size: 16px;
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-pixel-on 650ms ease-in-out infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 11px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 0 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 0 11px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 11px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 11px / 4px 4px;
background-repeat: no-repeat;
opacity: 0.85;
width: 16px;
height: 16px;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before { animation: none; opacity: 0.7; }
@keyframes au-load-drive {
0%, 100% { opacity: 0.35; }
50% { opacity: 1; }
}
@keyframes au-load-orbit { to { transform: rotate(360deg); } }
@keyframes au-pixel-on {
0%, 100% { opacity: 0.2; }
40% { opacity: 1; }
}
/* --- absorbed: thinking-indicator (alias classes preserved) --- */
.au-thinking-indicator {
align-items: center;
color: var(--au-fg-muted);
display: inline-flex;
font-size: 13px;
gap: 8px;
}
.au-thinking-indicator__label {
color: var(--au-fg-muted);
font-family: var(--au-font-sans);
font-size: 13px;
font-variant-numeric: tabular-nums;
line-height: 1.4;
}
.au-thinking-indicator[hidden] {
display: none;
}
.au-thinking-indicator__dots {
display: inline-flex;
gap: 4px;
}
.au-thinking-indicator__dots span {
animation: au-thinking-pulse 1.2s var(--au-ease) infinite;
background: var(--au-fg-muted);
border-radius: 50%;
height: 4px;
opacity: 0.45;
width: 4px;
}
.au-thinking-indicator__dots span:nth-child(2) {
animation-delay: 120ms;
}
.au-thinking-indicator__dots span:nth-child(3) {
animation-delay: 240ms;
}
@keyframes au-thinking-pulse {
0%,
60%,
100% {
opacity: 0.35;
transform: translateY(0);
}
30% {
opacity: 1;
transform: translateY(-2px);
}
}
@media (prefers-reduced-motion: reduce) {
.au-thinking-indicator__dots span {
animation: none;
opacity: 0.8;
}
}
/* --- absorbed: status-pill → variant pill --- */
/* agent-ui / status-pill — first-class component (promoted from host extracts). */
.au-status-pill {
align-items: center;
background: var(--au-surface-muted);
border-radius: var(--au-radius-pill);
color: var(--au-fg-muted);
display: inline-flex;
font: 500 11px/1 var(--au-font-sans);
gap: 8px;
padding: 4px 8px;
text-transform: capitalize;
}
.au-status-pill::before {
background: var(--au-fg-subtle);
border-radius: 50%;
content: "";
height: 8px;
width: 8px;
}
.au-status-pill[data-au-state="running"]::before,
.au-status-pill[data-au-state="streaming"]::before { background: var(--au-action); }
.au-status-pill[data-au-state="success"],
.au-status-pill[data-au-state="completed"] { color: var(--au-fg); }
.au-status-pill[data-au-state="success"]::before,
.au-status-pill[data-au-state="completed"]::before { background: var(--au-success); }
.au-status-pill[data-au-state="error"]::before,
.au-status-pill[data-au-state="failed"]::before { background: var(--au-danger); }
/* Compact pill variant (formerly status-pill standalone) */
.au-loading[data-au-variant="pill"],
.au-loading-state[data-au-variant="pill"] {
display: inline-flex;
flex-direction: row;
gap: 8px;
min-height: 0;
padding: 0;
text-align: start;
}
.au-loading[data-au-variant="pill"] .au-loading__mark,
.au-loading[data-au-variant="pill"] .au-loading__time,
.au-loading[data-au-variant="pill"] .au-thinking-indicator {
display: none;
}
</style>
<div class="au-thinking-indicator" role="status" aria-live="polite"><span class="sr-only">Thinking…</span><svg class="au-thinking-indicator__mark" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 12c2-3.5 7-3.5 7 0s-5 3.5-7 0-7-3.5-7 0 5 3.5 7 0z"/></svg><span class="au-thinking-indicator__label au-thinking-indicator__label--shimmer" aria-hidden="true">Thinking</span></div>Dots
Agent is thinking
Code
loading-state.html + loading-state.css
loading-state
<style>
/* agent-ui / loading-state — first-class component (promoted from host extracts). */
/* ===== host composition (host chrome; compose MVP) ===== */
/* 01 Loading variants: Drive / Dots / Orbit + elapsed */
.au-loading,
.au-loading-state {
align-items: center;
display: flex;
flex-direction: column;
gap: 12px;
justify-content: center;
min-height: 8rem;
padding: 24px;
text-align: center;
}
.au-loading__label {
color: var(--au-fg);
font: 500 14px/1.3 var(--au-font-sans);
}
.au-loading__time {
color: var(--au-fg-subtle);
font: 400 12px/1 var(--au-font-mono);
font-variant-numeric: tabular-nums;
}
.au-loading__variants {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 8px;
}
.au-loading__variants .au-btn[aria-pressed="true"] {
background: var(--au-surface-muted);
color: var(--au-fg);
}
.au-loading[data-au-variant="dots"] .au-loading__mark { display: none; }
.au-loading[data-au-variant="dots"] .au-thinking-indicator { display: inline-flex; }
.au-loading:not([data-au-variant="dots"]) .au-thinking-indicator { display: none; }
.au-loading__mark {
--au-load-size: 28px;
color: var(--au-action);
height: var(--au-load-size);
position: relative;
width: var(--au-load-size);
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-load-drive 1.1s linear infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 33% 33%,
linear-gradient(currentColor 0 0) 50% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 100% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 0 50% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 0 100% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 100% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 100% / 33% 33%;
background-repeat: no-repeat;
content: "";
display: block;
height: 100%;
opacity: 0.85;
width: 100%;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
border: 2px solid color-mix(in srgb, var(--au-action) 35%, transparent);
border-radius: 50%;
content: "";
inset: 0;
position: absolute;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
animation: au-load-orbit 0.9s linear infinite;
border-color: var(--au-action) transparent transparent transparent;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after { animation: none; }
/* ===== host composition detail chrome (per-component pages only) ===== */
/* Pixel-grid Drive mark closer to host composition */
.au-loading[data-au-variant="drive"] .au-loading__mark {
--au-load-size: 16px;
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-pixel-on 650ms ease-in-out infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 11px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 0 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 0 11px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 11px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 11px / 4px 4px;
background-repeat: no-repeat;
opacity: 0.85;
width: 16px;
height: 16px;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before { animation: none; opacity: 0.7; }
@keyframes au-load-drive {
0%, 100% { opacity: 0.35; }
50% { opacity: 1; }
}
@keyframes au-load-orbit { to { transform: rotate(360deg); } }
@keyframes au-pixel-on {
0%, 100% { opacity: 0.2; }
40% { opacity: 1; }
}
/* --- absorbed: thinking-indicator (alias classes preserved) --- */
.au-thinking-indicator {
align-items: center;
color: var(--au-fg-muted);
display: inline-flex;
font-size: 13px;
gap: 8px;
}
.au-thinking-indicator__label {
color: var(--au-fg-muted);
font-family: var(--au-font-sans);
font-size: 13px;
font-variant-numeric: tabular-nums;
line-height: 1.4;
}
.au-thinking-indicator[hidden] {
display: none;
}
.au-thinking-indicator__dots {
display: inline-flex;
gap: 4px;
}
.au-thinking-indicator__dots span {
animation: au-thinking-pulse 1.2s var(--au-ease) infinite;
background: var(--au-fg-muted);
border-radius: 50%;
height: 4px;
opacity: 0.45;
width: 4px;
}
.au-thinking-indicator__dots span:nth-child(2) {
animation-delay: 120ms;
}
.au-thinking-indicator__dots span:nth-child(3) {
animation-delay: 240ms;
}
@keyframes au-thinking-pulse {
0%,
60%,
100% {
opacity: 0.35;
transform: translateY(0);
}
30% {
opacity: 1;
transform: translateY(-2px);
}
}
@media (prefers-reduced-motion: reduce) {
.au-thinking-indicator__dots span {
animation: none;
opacity: 0.8;
}
}
/* --- absorbed: status-pill → variant pill --- */
/* agent-ui / status-pill — first-class component (promoted from host extracts). */
.au-status-pill {
align-items: center;
background: var(--au-surface-muted);
border-radius: var(--au-radius-pill);
color: var(--au-fg-muted);
display: inline-flex;
font: 500 11px/1 var(--au-font-sans);
gap: 8px;
padding: 4px 8px;
text-transform: capitalize;
}
.au-status-pill::before {
background: var(--au-fg-subtle);
border-radius: 50%;
content: "";
height: 8px;
width: 8px;
}
.au-status-pill[data-au-state="running"]::before,
.au-status-pill[data-au-state="streaming"]::before { background: var(--au-action); }
.au-status-pill[data-au-state="success"],
.au-status-pill[data-au-state="completed"] { color: var(--au-fg); }
.au-status-pill[data-au-state="success"]::before,
.au-status-pill[data-au-state="completed"]::before { background: var(--au-success); }
.au-status-pill[data-au-state="error"]::before,
.au-status-pill[data-au-state="failed"]::before { background: var(--au-danger); }
/* Compact pill variant (formerly status-pill standalone) */
.au-loading[data-au-variant="pill"],
.au-loading-state[data-au-variant="pill"] {
display: inline-flex;
flex-direction: row;
gap: 8px;
min-height: 0;
padding: 0;
text-align: start;
}
.au-loading[data-au-variant="pill"] .au-loading__mark,
.au-loading[data-au-variant="pill"] .au-loading__time,
.au-loading[data-au-variant="pill"] .au-thinking-indicator {
display: none;
}
</style>
<div class="au-thinking-indicator" role="status" aria-live="polite"><span class="au-thinking-indicator__dots" aria-hidden="true"><span></span><span></span><span></span></span><span class="au-thinking-indicator__label">Agent is thinking</span></div>Drive
Working
0.0s
Code
loading-state.html + loading-state.css
loading-state
<style>
/* agent-ui / loading-state — first-class component (promoted from host extracts). */
/* ===== host composition (host chrome; compose MVP) ===== */
/* 01 Loading variants: Drive / Dots / Orbit + elapsed */
.au-loading,
.au-loading-state {
align-items: center;
display: flex;
flex-direction: column;
gap: 12px;
justify-content: center;
min-height: 8rem;
padding: 24px;
text-align: center;
}
.au-loading__label {
color: var(--au-fg);
font: 500 14px/1.3 var(--au-font-sans);
}
.au-loading__time {
color: var(--au-fg-subtle);
font: 400 12px/1 var(--au-font-mono);
font-variant-numeric: tabular-nums;
}
.au-loading__variants {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 8px;
}
.au-loading__variants .au-btn[aria-pressed="true"] {
background: var(--au-surface-muted);
color: var(--au-fg);
}
.au-loading[data-au-variant="dots"] .au-loading__mark { display: none; }
.au-loading[data-au-variant="dots"] .au-thinking-indicator { display: inline-flex; }
.au-loading:not([data-au-variant="dots"]) .au-thinking-indicator { display: none; }
.au-loading__mark {
--au-load-size: 28px;
color: var(--au-action);
height: var(--au-load-size);
position: relative;
width: var(--au-load-size);
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-load-drive 1.1s linear infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 33% 33%,
linear-gradient(currentColor 0 0) 50% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 100% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 0 50% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 0 100% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 100% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 100% / 33% 33%;
background-repeat: no-repeat;
content: "";
display: block;
height: 100%;
opacity: 0.85;
width: 100%;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
border: 2px solid color-mix(in srgb, var(--au-action) 35%, transparent);
border-radius: 50%;
content: "";
inset: 0;
position: absolute;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
animation: au-load-orbit 0.9s linear infinite;
border-color: var(--au-action) transparent transparent transparent;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after { animation: none; }
/* ===== host composition detail chrome (per-component pages only) ===== */
/* Pixel-grid Drive mark closer to host composition */
.au-loading[data-au-variant="drive"] .au-loading__mark {
--au-load-size: 16px;
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-pixel-on 650ms ease-in-out infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 11px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 0 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 0 11px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 11px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 11px / 4px 4px;
background-repeat: no-repeat;
opacity: 0.85;
width: 16px;
height: 16px;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before { animation: none; opacity: 0.7; }
@keyframes au-load-drive {
0%, 100% { opacity: 0.35; }
50% { opacity: 1; }
}
@keyframes au-load-orbit { to { transform: rotate(360deg); } }
@keyframes au-pixel-on {
0%, 100% { opacity: 0.2; }
40% { opacity: 1; }
}
/* --- absorbed: thinking-indicator (alias classes preserved) --- */
.au-thinking-indicator {
align-items: center;
color: var(--au-fg-muted);
display: inline-flex;
font-size: 13px;
gap: 8px;
}
.au-thinking-indicator__label {
color: var(--au-fg-muted);
font-family: var(--au-font-sans);
font-size: 13px;
font-variant-numeric: tabular-nums;
line-height: 1.4;
}
.au-thinking-indicator[hidden] {
display: none;
}
.au-thinking-indicator__dots {
display: inline-flex;
gap: 4px;
}
.au-thinking-indicator__dots span {
animation: au-thinking-pulse 1.2s var(--au-ease) infinite;
background: var(--au-fg-muted);
border-radius: 50%;
height: 4px;
opacity: 0.45;
width: 4px;
}
.au-thinking-indicator__dots span:nth-child(2) {
animation-delay: 120ms;
}
.au-thinking-indicator__dots span:nth-child(3) {
animation-delay: 240ms;
}
@keyframes au-thinking-pulse {
0%,
60%,
100% {
opacity: 0.35;
transform: translateY(0);
}
30% {
opacity: 1;
transform: translateY(-2px);
}
}
@media (prefers-reduced-motion: reduce) {
.au-thinking-indicator__dots span {
animation: none;
opacity: 0.8;
}
}
/* --- absorbed: status-pill → variant pill --- */
/* agent-ui / status-pill — first-class component (promoted from host extracts). */
.au-status-pill {
align-items: center;
background: var(--au-surface-muted);
border-radius: var(--au-radius-pill);
color: var(--au-fg-muted);
display: inline-flex;
font: 500 11px/1 var(--au-font-sans);
gap: 8px;
padding: 4px 8px;
text-transform: capitalize;
}
.au-status-pill::before {
background: var(--au-fg-subtle);
border-radius: 50%;
content: "";
height: 8px;
width: 8px;
}
.au-status-pill[data-au-state="running"]::before,
.au-status-pill[data-au-state="streaming"]::before { background: var(--au-action); }
.au-status-pill[data-au-state="success"],
.au-status-pill[data-au-state="completed"] { color: var(--au-fg); }
.au-status-pill[data-au-state="success"]::before,
.au-status-pill[data-au-state="completed"]::before { background: var(--au-success); }
.au-status-pill[data-au-state="error"]::before,
.au-status-pill[data-au-state="failed"]::before { background: var(--au-danger); }
/* Compact pill variant (formerly status-pill standalone) */
.au-loading[data-au-variant="pill"],
.au-loading-state[data-au-variant="pill"] {
display: inline-flex;
flex-direction: row;
gap: 8px;
min-height: 0;
padding: 0;
text-align: start;
}
.au-loading[data-au-variant="pill"] .au-loading__mark,
.au-loading[data-au-variant="pill"] .au-loading__time,
.au-loading[data-au-variant="pill"] .au-thinking-indicator {
display: none;
}
</style>
<div class="au-loading" data-au-variant="drive" data-au-component="loading-state" role="status" aria-live="polite"><span class="au-loading__mark" aria-hidden="true"></span><p class="au-loading__label">Working</p><p class="au-loading__time">0.0s</p></div>Orbit
Working
1.2s
Code
loading-state.html + loading-state.css
loading-state
<style>
/* agent-ui / loading-state — first-class component (promoted from host extracts). */
/* ===== host composition (host chrome; compose MVP) ===== */
/* 01 Loading variants: Drive / Dots / Orbit + elapsed */
.au-loading,
.au-loading-state {
align-items: center;
display: flex;
flex-direction: column;
gap: 12px;
justify-content: center;
min-height: 8rem;
padding: 24px;
text-align: center;
}
.au-loading__label {
color: var(--au-fg);
font: 500 14px/1.3 var(--au-font-sans);
}
.au-loading__time {
color: var(--au-fg-subtle);
font: 400 12px/1 var(--au-font-mono);
font-variant-numeric: tabular-nums;
}
.au-loading__variants {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 8px;
}
.au-loading__variants .au-btn[aria-pressed="true"] {
background: var(--au-surface-muted);
color: var(--au-fg);
}
.au-loading[data-au-variant="dots"] .au-loading__mark { display: none; }
.au-loading[data-au-variant="dots"] .au-thinking-indicator { display: inline-flex; }
.au-loading:not([data-au-variant="dots"]) .au-thinking-indicator { display: none; }
.au-loading__mark {
--au-load-size: 28px;
color: var(--au-action);
height: var(--au-load-size);
position: relative;
width: var(--au-load-size);
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-load-drive 1.1s linear infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 33% 33%,
linear-gradient(currentColor 0 0) 50% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 100% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 0 50% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 0 100% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 100% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 100% / 33% 33%;
background-repeat: no-repeat;
content: "";
display: block;
height: 100%;
opacity: 0.85;
width: 100%;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
border: 2px solid color-mix(in srgb, var(--au-action) 35%, transparent);
border-radius: 50%;
content: "";
inset: 0;
position: absolute;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
animation: au-load-orbit 0.9s linear infinite;
border-color: var(--au-action) transparent transparent transparent;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after { animation: none; }
/* ===== host composition detail chrome (per-component pages only) ===== */
/* Pixel-grid Drive mark closer to host composition */
.au-loading[data-au-variant="drive"] .au-loading__mark {
--au-load-size: 16px;
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-pixel-on 650ms ease-in-out infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 11px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 0 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 0 11px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 11px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 11px / 4px 4px;
background-repeat: no-repeat;
opacity: 0.85;
width: 16px;
height: 16px;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before { animation: none; opacity: 0.7; }
@keyframes au-load-drive {
0%, 100% { opacity: 0.35; }
50% { opacity: 1; }
}
@keyframes au-load-orbit { to { transform: rotate(360deg); } }
@keyframes au-pixel-on {
0%, 100% { opacity: 0.2; }
40% { opacity: 1; }
}
/* --- absorbed: thinking-indicator (alias classes preserved) --- */
.au-thinking-indicator {
align-items: center;
color: var(--au-fg-muted);
display: inline-flex;
font-size: 13px;
gap: 8px;
}
.au-thinking-indicator__label {
color: var(--au-fg-muted);
font-family: var(--au-font-sans);
font-size: 13px;
font-variant-numeric: tabular-nums;
line-height: 1.4;
}
.au-thinking-indicator[hidden] {
display: none;
}
.au-thinking-indicator__dots {
display: inline-flex;
gap: 4px;
}
.au-thinking-indicator__dots span {
animation: au-thinking-pulse 1.2s var(--au-ease) infinite;
background: var(--au-fg-muted);
border-radius: 50%;
height: 4px;
opacity: 0.45;
width: 4px;
}
.au-thinking-indicator__dots span:nth-child(2) {
animation-delay: 120ms;
}
.au-thinking-indicator__dots span:nth-child(3) {
animation-delay: 240ms;
}
@keyframes au-thinking-pulse {
0%,
60%,
100% {
opacity: 0.35;
transform: translateY(0);
}
30% {
opacity: 1;
transform: translateY(-2px);
}
}
@media (prefers-reduced-motion: reduce) {
.au-thinking-indicator__dots span {
animation: none;
opacity: 0.8;
}
}
/* --- absorbed: status-pill → variant pill --- */
/* agent-ui / status-pill — first-class component (promoted from host extracts). */
.au-status-pill {
align-items: center;
background: var(--au-surface-muted);
border-radius: var(--au-radius-pill);
color: var(--au-fg-muted);
display: inline-flex;
font: 500 11px/1 var(--au-font-sans);
gap: 8px;
padding: 4px 8px;
text-transform: capitalize;
}
.au-status-pill::before {
background: var(--au-fg-subtle);
border-radius: 50%;
content: "";
height: 8px;
width: 8px;
}
.au-status-pill[data-au-state="running"]::before,
.au-status-pill[data-au-state="streaming"]::before { background: var(--au-action); }
.au-status-pill[data-au-state="success"],
.au-status-pill[data-au-state="completed"] { color: var(--au-fg); }
.au-status-pill[data-au-state="success"]::before,
.au-status-pill[data-au-state="completed"]::before { background: var(--au-success); }
.au-status-pill[data-au-state="error"]::before,
.au-status-pill[data-au-state="failed"]::before { background: var(--au-danger); }
/* Compact pill variant (formerly status-pill standalone) */
.au-loading[data-au-variant="pill"],
.au-loading-state[data-au-variant="pill"] {
display: inline-flex;
flex-direction: row;
gap: 8px;
min-height: 0;
padding: 0;
text-align: start;
}
.au-loading[data-au-variant="pill"] .au-loading__mark,
.au-loading[data-au-variant="pill"] .au-loading__time,
.au-loading[data-au-variant="pill"] .au-thinking-indicator {
display: none;
}
</style>
<div class="au-loading" data-au-variant="orbit" data-au-component="loading-state" role="status" aria-live="polite"><span class="au-loading__mark" aria-hidden="true"></span><p class="au-loading__label">Working</p><p class="au-loading__time">1.2s</p></div>Pill
Running
Code
loading-state.html + loading-state.css
loading-state
<style>
/* agent-ui / loading-state — first-class component (promoted from host extracts). */
/* ===== host composition (host chrome; compose MVP) ===== */
/* 01 Loading variants: Drive / Dots / Orbit + elapsed */
.au-loading,
.au-loading-state {
align-items: center;
display: flex;
flex-direction: column;
gap: 12px;
justify-content: center;
min-height: 8rem;
padding: 24px;
text-align: center;
}
.au-loading__label {
color: var(--au-fg);
font: 500 14px/1.3 var(--au-font-sans);
}
.au-loading__time {
color: var(--au-fg-subtle);
font: 400 12px/1 var(--au-font-mono);
font-variant-numeric: tabular-nums;
}
.au-loading__variants {
display: flex;
gap: 8px;
justify-content: center;
margin-top: 8px;
}
.au-loading__variants .au-btn[aria-pressed="true"] {
background: var(--au-surface-muted);
color: var(--au-fg);
}
.au-loading[data-au-variant="dots"] .au-loading__mark { display: none; }
.au-loading[data-au-variant="dots"] .au-thinking-indicator { display: inline-flex; }
.au-loading:not([data-au-variant="dots"]) .au-thinking-indicator { display: none; }
.au-loading__mark {
--au-load-size: 28px;
color: var(--au-action);
height: var(--au-load-size);
position: relative;
width: var(--au-load-size);
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-load-drive 1.1s linear infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 33% 33%,
linear-gradient(currentColor 0 0) 50% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 100% 0 / 33% 33%,
linear-gradient(currentColor 0 0) 0 50% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 50% / 33% 33%,
linear-gradient(currentColor 0 0) 0 100% / 33% 33%,
linear-gradient(currentColor 0 0) 50% 100% / 33% 33%,
linear-gradient(currentColor 0 0) 100% 100% / 33% 33%;
background-repeat: no-repeat;
content: "";
display: block;
height: 100%;
opacity: 0.85;
width: 100%;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
border: 2px solid color-mix(in srgb, var(--au-action) 35%, transparent);
border-radius: 50%;
content: "";
inset: 0;
position: absolute;
}
.au-loading[data-au-variant="orbit"] .au-loading__mark::after {
animation: au-load-orbit 0.9s linear infinite;
border-color: var(--au-action) transparent transparent transparent;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before,
.au-loading[data-au-variant="orbit"] .au-loading__mark::after { animation: none; }
/* ===== host composition detail chrome (per-component pages only) ===== */
/* Pixel-grid Drive mark closer to host composition */
.au-loading[data-au-variant="drive"] .au-loading__mark {
--au-load-size: 16px;
}
.au-loading[data-au-variant="drive"] .au-loading__mark::before {
animation: au-pixel-on 650ms ease-in-out infinite;
background:
linear-gradient(currentColor 0 0) 0 0 / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 11px 0 / 4px 4px,
linear-gradient(currentColor 0 0) 0 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 5.5px / 4px 4px,
linear-gradient(currentColor 0 0) 0 11px / 4px 4px,
linear-gradient(currentColor 0 0) 5.5px 11px / 4px 4px,
linear-gradient(currentColor 0 0) 11px 11px / 4px 4px;
background-repeat: no-repeat;
opacity: 0.85;
width: 16px;
height: 16px;
}
@media (prefers-reduced-motion: reduce) {
.au-loading[data-au-variant="drive"] .au-loading__mark::before { animation: none; opacity: 0.7; }
@keyframes au-load-drive {
0%, 100% { opacity: 0.35; }
50% { opacity: 1; }
}
@keyframes au-load-orbit { to { transform: rotate(360deg); } }
@keyframes au-pixel-on {
0%, 100% { opacity: 0.2; }
40% { opacity: 1; }
}
/* --- absorbed: thinking-indicator (alias classes preserved) --- */
.au-thinking-indicator {
align-items: center;
color: var(--au-fg-muted);
display: inline-flex;
font-size: 13px;
gap: 8px;
}
.au-thinking-indicator__label {
color: var(--au-fg-muted);
font-family: var(--au-font-sans);
font-size: 13px;
font-variant-numeric: tabular-nums;
line-height: 1.4;
}
.au-thinking-indicator[hidden] {
display: none;
}
.au-thinking-indicator__dots {
display: inline-flex;
gap: 4px;
}
.au-thinking-indicator__dots span {
animation: au-thinking-pulse 1.2s var(--au-ease) infinite;
background: var(--au-fg-muted);
border-radius: 50%;
height: 4px;
opacity: 0.45;
width: 4px;
}
.au-thinking-indicator__dots span:nth-child(2) {
animation-delay: 120ms;
}
.au-thinking-indicator__dots span:nth-child(3) {
animation-delay: 240ms;
}
@keyframes au-thinking-pulse {
0%,
60%,
100% {
opacity: 0.35;
transform: translateY(0);
}
30% {
opacity: 1;
transform: translateY(-2px);
}
}
@media (prefers-reduced-motion: reduce) {
.au-thinking-indicator__dots span {
animation: none;
opacity: 0.8;
}
}
/* --- absorbed: status-pill → variant pill --- */
/* agent-ui / status-pill — first-class component (promoted from host extracts). */
.au-status-pill {
align-items: center;
background: var(--au-surface-muted);
border-radius: var(--au-radius-pill);
color: var(--au-fg-muted);
display: inline-flex;
font: 500 11px/1 var(--au-font-sans);
gap: 8px;
padding: 4px 8px;
text-transform: capitalize;
}
.au-status-pill::before {
background: var(--au-fg-subtle);
border-radius: 50%;
content: "";
height: 8px;
width: 8px;
}
.au-status-pill[data-au-state="running"]::before,
.au-status-pill[data-au-state="streaming"]::before { background: var(--au-action); }
.au-status-pill[data-au-state="success"],
.au-status-pill[data-au-state="completed"] { color: var(--au-fg); }
.au-status-pill[data-au-state="success"]::before,
.au-status-pill[data-au-state="completed"]::before { background: var(--au-success); }
.au-status-pill[data-au-state="error"]::before,
.au-status-pill[data-au-state="failed"]::before { background: var(--au-danger); }
/* Compact pill variant (formerly status-pill standalone) */
.au-loading[data-au-variant="pill"],
.au-loading-state[data-au-variant="pill"] {
display: inline-flex;
flex-direction: row;
gap: 8px;
min-height: 0;
padding: 0;
text-align: start;
}
.au-loading[data-au-variant="pill"] .au-loading__mark,
.au-loading[data-au-variant="pill"] .au-loading__time,
.au-loading[data-au-variant="pill"] .au-thinking-indicator {
display: none;
}
</style>
<span class="au-status-pill" data-au-component="loading-state" data-au-variant="pill" data-au-state="running">Running</span>Component contract
- Install
- tokens.css · loading-state.css · host-chrome.css
- States
- running and streaming; pill uses status states success/error/etc
- Host
- when waiting starts/ends and elapsed time
For agents
loading-state.contract
# agent-ui / loading-state
component: loading-state
selector: .au-loading-state
data_au_component: loading-state
purpose: Waiting/activity with variants drive | dots | orbit | mark | pill (absorbs thinking-indicator, status-pill).
install:
- tokens.css
- loading-state.css
- host-chrome.css for shimmer labels
states: running and streaming; pill uses status states success/error/etc.
css_variables: No component-specific variables.
events: native form, focus, and click only — no custom events or runtime required
no_javascript: Labels remain understandable without animation.
host_owns: The host owns when waiting starts/ends and elapsed time.
accessibility: Use role=status and aria-live=polite for loaders.
security: Does not imply authorization or success.
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/loading-state/loading-state.{html,css} + README.md + fixture.html