Getting Started

arclo is an AI-native design system for React. It provides 20 components every AI product needs — primitives that don't exist in MUI, Tailwind, Radix, or shadcn/ui.

Installation

bash
npm install @arc-lo/ui

Setup

Add the styles import to your CSS file:

css
@import "tailwindcss";
@import "@arc-lo/ui/styles.css";

That's it — theme variables, dark mode, and Tailwind utility scanning are all included. See Theming for color customization.

Quick start

tsx
import {
  ChatThread,
  StreamingText,
  FeedbackBar,
  ThinkingBlock,
  PromptBox,
} from "@arc-lo/ui";

function Chat({ response }) {
  return (
    <ChatThread.Root className="h-[500px]">
      <ChatThread.Messages>
        <ChatThread.UserMessage name="You">
          How does this work?
        </ChatThread.UserMessage>

        <ChatThread.AssistantMessage name="Claude">
          <ThinkingBlock.Root state="done" duration={3} collapseOnDone>
            <ThinkingBlock.Trigger />
            <ThinkingBlock.Content>Analyzing...</ThinkingBlock.Content>
          </ThinkingBlock.Root>

          <StreamingText.Root text={response} speed={30}>
            <StreamingText.Content />
            <StreamingText.Cursor />
            <StreamingText.Toolbar>
              <FeedbackBar.Root>
                <FeedbackBar.ThumbsUp />
                <FeedbackBar.ThumbsDown />
                <FeedbackBar.Copy />
              </FeedbackBar.Root>
            </StreamingText.Toolbar>
          </StreamingText.Root>
        </ChatThread.AssistantMessage>

        <ChatThread.ScrollAnchor />
      </ChatThread.Messages>
    </ChatThread.Root>
  );
}

Philosophy

  • Radix-style composable API — compound components with Root + parts. Use only what you need.
  • Built for AI states — pending, streaming, done, interrupted, error, and ratelimit are first-class states, not afterthoughts.
  • Works with shadcn/ui — same Tailwind + Radix conventions. Drop arclo components into an existing shadcn project.
  • Trust & uncertainty — visual language for confidence levels, citations, and refusals. The layer no other DS has.
  • Agent-ready — ThinkingBlock and ToolCall handle chain-of-thought reasoning and tool invocations out of the box.
  • Media generation — ImageGen and VideoGen for AI-generated images and videos with progress, states, and playback.
  • Themeable — 6 built-in color themes, CSS custom properties, light + dark mode.

Components

Streaming & rendering

ComponentPurpose
StreamingTextToken-by-token rendering with 6 lifecycle states
MarkdownRendererStreaming-aware markdown with code blocks, lists, and links
StatusIndicatorAnimated AI status label with letter-by-letter light sweep
CodeBlockCode display with copy button, line numbers, and language badge

Input & interaction

ComponentPurpose
PromptBoxAI prompt input with auto-grow, chips, and suggestions
FeedbackBarResponse actions toolbar — thumbs, copy, regenerate
ModelSelectorDropdown selector for AI models with badges
SuggestTopicsStarter prompt cards for empty chat states
ConversationBranchBranch navigation for regenerated responses
FileAttachmentFile preview chips/cards with type icons and upload progress

Trust & transparency

ComponentPurpose
ConfidenceBadgeVisual confidence indicators (badge, dot, inline)
CitationInlineInline source references with hover previews
RefusalCardDeclined request handling with alternatives

Reasoning & agents

ComponentPurpose
ThinkingBlockCollapsible chain-of-thought reasoning display
ToolCallTool invocation with status, inputs, and outputs
ChatThreadConversation container with user/assistant/system messages

Media generation

ComponentPurpose
ImageGenImage generation with blur reveal, progress, and 5 states
VideoGenVideo generation with stages, player, progress, and 6 states

Analytics & data

ComponentPurpose
TokenUsageVisual token/cost meter with input/output proportions
SourceCardRAG retrieval result with relevance scoring