agentskit.js
UI + hooks

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
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page