Case Study
Building with
Claude API
+ Nodus Design System
This case study documents how we built the Agent Chat Interface template using the Anthropic SDK and five purpose-built Nodus DS components. From first token to accessible, production-ready UI — the complete integration story.
Architecture
Five layers. One rendering pipeline.
The Agent Chat Interface is a vertical stack from API call to rendered UI. Each Nodus DS component owns exactly one layer of the pipeline — no component reaches across layers.
claude-opus-4-6 with streaming enabled. Messages API with tool_use blocks for structured function calls. Streaming events: message_start, content_block_delta, message_stop.
Consumes the Anthropic stream and renders token-by-token output. Handles partial markdown, code fences, and JSON artifacts. Manages streaming state machine: idle → streaming → complete → error.
Renders tool_use content blocks as structured inspector cards. Shows function name, input arguments (syntax-highlighted JSON), and the tool_result response. Collapsible by default.
Reads usage.input_tokens + usage.output_tokens from message events. Renders a segmented bar with model-specific max context (200k for Opus 4). Warning threshold at 80%, critical at 95%.
Dropdown with Haiku 4.5, Sonnet 4.6, Opus 4.6 variants. Shows context window, vision support, speed tier, and relative cost per token. Persists selection to localStorage.
Implementation
Three steps to production.
Install and configure
Create the streaming client
Wire up the components
Token Economics
Context window in context.
ContextWindowMeter renders real-time token consumption against the model's max context. This example shows a typical treasury analysis session with tool calls.
12.2% used — well within budget. Warning at 80%, critical at 95%.
Accessibility Audit
WCAG AA across all states.
Streaming UI is uniquely challenging for accessibility — content changes rapidly without user interaction. We handle this through aria-live regions with debounced announcements, preventing screen reader flood.
Color contrast — body text
WCAG AA requires 4.5:1
Color contrast — streaming tokens
WCAG AA requires 4.5:1
Keyboard navigation
Tab, Arrow keys, Enter, Escape
Screen reader — live regions
Streaming tokens announced progressively
Reduced motion
Streaming animation disabled on prefers-reduced-motion
Focus management
3px offset, agency-colored ring
Awards Submission
Exhibit A for the agent era.
This case study is submitted as the primary exhibit for the Awwwards SOTD and CSS Design Awards nominations. The Agent Chat Interface template demonstrates the complete Claude API integration story — from API call to accessible, production-ready UI — using only Nodus DS components.
No other design system has built primitives specifically for Claude API. StreamingArtifact, ContextWindowMeter, and FunctionCallVisualizer are novel problem domains. This case study is evidence that design systems can lead — not follow — the tooling required by the agent era.