Skip to main content

UI primitives

Arco primitives are small, reusable controls under src/components/ui/. Each wraps existing BEM classes from src/styles/ui.css.

Available components

ComponentCSS baseUse for
Button.arco-btnActions, toolbar buttons
Input.arco-inputText fields, search
Switch.arco-switchBoolean toggles
Badge.arco-chip variantStatus labels
Chip.arco-chipTags, filters
EmptyState.arco-emptyLoading, empty, error states

Button variants

import { Button } from "@/components/ui";

<Button variant="primary">Save</Button>
<Button variant="secondary">Cancel</Button>
<Button variant="ghost">Dismiss</Button>
<Button size="sm">Compact</Button>

Empty states

Use EmptyState for every list, panel, or workspace that can be empty, loading, or disabled:

<EmptyState
title="No messages"
description="Start a conversation with the agent."
action={<Button variant="primary">New chat</Button>}
/>

Conventions

  • If a control appears on two or more screens, it belongs in ui/ — not inline in an app.
  • Use Lucide icons (lucide-react) for iconography; match manifest kebab names.
  • Prefer BEM classes + tokens over inline style={{}}.

CSS-only usage

You can use primitives without React where needed:

<button class="arco-btn arco-btn--primary">Save</button>
<input class="arco-input" type="text" />

See component tiers for how primitives fit into the four-tier model.