agentskit.js

Data attributes

AgentsKit UI components are headless. Every stylable hook is a data-ak-* attribute so your CSS (or your LLM) can target them reliably.

Components emit zero styles. They emit data attributes. Style with your favorite CSS stack; generate UI with an LLM and the attributes tell it exactly where to hook.

#Reference

AttributeWhereValues
data-ak-chat-containerroot of ChatContainerβ€”
data-ak-messageroot of Messageβ€”
data-ak-roleon Message rootuser Β· assistant Β· tool Β· system
data-ak-streamingon Message roottrue Β· false
data-ak-partevery message parttext Β· tool-call Β· tool-result Β· image Β· file
data-ak-tool-callroot of ToolCallViewβ€”
data-ak-statuson ToolCallViewpending Β· running Β· done Β· error Β· awaiting-approval
data-ak-input-barroot of InputBarβ€”
data-ak-thinkingroot of ThinkingIndicatorβ€”
data-ak-markdownroot of Markdownβ€”
data-ak-code-blockroot of CodeBlockβ€”

#Generative UI

Because selectors are stable and framework-agnostic, LLMs can generate CSS / className overrides that work cross-framework. See Generative UI recipe.

  • Theming β€” CSS variables + preset themes

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page