Accessibility
Chat is a transcript region plus a composer. The root exposes data-slot="chat", data-variant for the active form factor, and data-composer (floating / docked). Turns render as data-slot="message" with data-role; the composer is data-slot="prompt-input". When floating, the composer wrapper is data-slot="chat-composer".
scrollToLatestLabel for a localized name.submitLabel / addLabel (English defaults in the package).emptyState render that copy in the transcript region; without emptyState, Default docks the composer in flow until the first turn so content-sized hosts still expose the Reply field.floating) form factor, the transcript reserves the measured composer height so no turn is permanently obscured behind the scrim, and the scroll-to-latest control lifts above the composer.scrollToLatestLabel, composer placeholder / submitLabel, and emptyState when embedding in a product that requires i18n.author.name values (also used for avatar alt text).role="log" / aria-live) for streaming turns — data-slot attributes are styling and test selectors only.CodeBlock is a read-only code surface. Structure comes from a bordered container, a header with the language label and optional copy control, and a body that shows either plain <pre><code> (while highlighting loads or on failure) or Shiki-generated HTML.
IconButton with a clear title (Copy code / Copied).text).showCopy is true.<pre> / <code> fallback path for linear reading; Shiki output also emits pre/code.role="button" or make the entire surface clickable for copy—use the dedicated control.Shimmer is a purely visual in-progress treatment around a text label. The optional leading icon is decorative (aria-hidden); the label text is the meaningful content assistive tech should read.
prefers-reduced-motion, animation is disabled and both text and icon fall back to static --color-text-alt.