# Loom
> Chat, tool and approval components for AI agents, installed as source. Works with eve.
# Introduction
Source: https://loom.mkhonta.com/docs
Loom gives an agent a place in your product: the conversation, the tool calls it makes, the approvals and questions it asks, and the layouts that put it beside your own UI. The components install as files in your project through the shadcn CLI, so you own them and can change anything.
Loom works with [eve](https://eve.dev). One hook, `useLoomEve`, connects every component to an eve agent.
```tsx title="app/support.tsx"
"use client";
import { LoomThread } from "@/components/loom/thread";
import { useLoomEve } from "@/lib/loom/eve";
export function Support() {
const chat = useLoomEve({ agent: "support" });
return ;
}
```
## What's in the kit
- **Thread**: a whole conversation from one hook, with a header, messages, live activity and the composer.
- **Messages**: streamed Markdown replies, reasoning, files, and every tool call and interaction inline.
- **Tool cards**: each call's state, its input as it streams, and its result or error. Swap in your own UI for any tool.
- **Interactions**: approvals, questions, free-text answers and sign-ins, answered in place.
- **Composer**: attachments, sending while the agent works, stop, and recall of the last message.
- **Layouts**: a side panel, a floating widget, an inline card, and a full page.
- **Theme**: one set of `loom-*` tokens for color, radius, shadow and motion, in light and dark.
## How it fits together
Every component renders plain data: a `LoomChat` with the conversation and the commands to change it. `useLoomEve` builds that from eve, and it is the only file in the kit that imports eve. Components never talk to an agent directly, which keeps them easy to preview, test, and drive from anything else.
**[Installation](/docs/installation)**
Add the components to a shadcn app.
**[Connect eve](/docs/eve)**
What `useLoomEve` takes and returns.
**[Components](/docs/components)**
Every component and its props.
**[Theming](/docs/theming)**
Change the look with tokens.
---
# Components
Source: https://loom.mkhonta.com/docs/components
Each component is a file in `components/loom/` after you install it. Most apps only render a [thread](#thread) or a [layout](/docs/layouts); the pieces below are there when you want to compose your own.
:::tip[See them live]
The [components gallery](https://loom.mkhonta.com/components) has a live preview of each one, its full source to copy, and its install command.
:::
## Thread
The whole conversation: a header, the messages, what the agent is doing, errors, and the composer. It shares labels, answers and tool renderers with everything inside it.
```tsx
}}
/>
```
| Prop | Type | Default | Description |
| - | - | - | - |
| `chat` | `LoomChat` | - | The conversation, from `useLoomEve` or any `LoomChat`. |
| `title?` | `ReactNode \| false` | `"Assistant"` | Header title, such as an [agent picker](#agent-picker). `false` hides the header. |
| `actions?` | `ReactNode` | - | Extra header controls, before New conversation. |
| `onClose?` | `() => void` | - | Shows a close button. The panel and widget set it. |
| `empty?` | `{ title?, description?, suggestions?, icon? }` | - | The greeting and starter prompts on an empty conversation. Choosing a prompt sends it. |
| `tools?` | `Record ReactNode \| undefined>` | - | Your own UI for tools, by name. See [tool cards](#tool-cards). |
| `labels?` | `Partial` | - | Replace any text the kit shows. See [labels](#labels). |
| `messageActions?` | `{ retry?, edit?, feedback? }` | - | What each message's actions menu offers besides Copy. See [message actions](#message-actions). |
| `composer?` | `{ accept?, maxFileSize?, commands?, searchMentions?, voice?, placeholder?, autoFocus? }` | - | Passed to the [composer](#composer). |
| `commandShortcut?` | `string` | - | Opens the [command palette](#command-palette), like `"mod+k"`. The palette is offered when there are commands. |
| `inputRef?` | `Ref` | - | The composer's text box, to focus it. |
| `className?` | `string` | - | |
## Messages
`LoomMessageList` scrolls the conversation. It follows new content while the reader is at the bottom, even as a reply streams; once they scroll up it stays put and offers a button back to the latest. Sending a message always returns to the bottom.
`LoomMessageView` renders one message. The person's text is a bubble; the agent's reply is full width, with its parts in the order they came:
| Part | Renders as |
| --- | --- |
| `text` | Markdown through Streamdown, safe while it streams |
| `reasoning` | A collapsed "Thought" you can open; "Thinking" while it streams |
| `file` | An image, or a link to the file |
| `tool` | A [tool card](#tool-cards) |
| `interaction` | An [interaction card](#interactions) |
```tsx
Say hello
} />
```
The conversation is one stop in the Tab order. Inside it, ↑ and ↓ move between messages, Home and End jump to the first and last, and Enter opens the focused message's actions. Keys pressed in a message's own controls, such as a question's options, stay with those controls.
### Message actions
Each finished message has an actions menu, shown on hover or focus. Copy is always there. The rest show when you pass them to the thread, or to `LoomProvider` when you compose your own:
```tsx
chat.send(lastUserText(message)),
feedback: (message, rating) => track("reply_rated", { id: message.id, rating }),
}}
/>
```
| Action | On | Does |
| --- | --- | --- |
| `retry` | the agent's replies | Your function, e.g. send the question again |
| `edit` | the person's messages | The thread loads the message into the composer. Pass your own, or `edit: undefined` to hide it |
| `feedback` | the agent's replies | Good or bad reply, checked in the menu once chosen |
## Tool cards
`LoomToolCard` shows a call the agent made: its label, its state, its input as the model writes it, and its result or error with eve's hint. An approval for the call opens inside the card.
To show a tool your own way, give the thread a renderer for it. Return `undefined` to fall back to the card, for example while the call is still running:
```tsx
call.state === "completed" ? : undefined,
}}
/>
```
Call states: `streaming`, `requested`, `approval`, `running`, `blocked`, `completed`, `failed`, `rejected` and `cancelled`. Calls a tool marks as hidden don't render.
## Interactions
`LoomInteractionCard` renders what the agent asks a person, and answers through the thread's `respond`:
- **Approval**: the request's options as buttons, such as Approve and Deny.
- **Question**: buttons for a few options, or a list with Submit when the request asks for a select or has more than three. Free-text answers when the request allows them.
- **Sign-in**: the device code to enter and a link to the provider.
Once settled, the card shows the outcome and the answer given. A kind the kit doesn't know yet still renders from the prompt, options, free text and link that every request has.
## Composer
`LoomComposer` is the message box.
- Enter sends; Shift+Enter starts a new line; ↑ in an empty box brings back the last message.
- Attach files with the button, by dropping them on the box, or by pasting. They are sent as file parts.
- While the agent works, a new message waits for the current turn. Stop cancels the turn.
- `/` at the start of the message lists your slash commands, and `@` finds what can be mentioned. Arrow keys move through the suggestions, Enter or Tab picks one, and Escape closes the list.
- The microphone button dictates into the box.
| Prop | Type | Default | Description |
| - | - | - | - |
| `chat` | `LoomChat` | - | Uses `status`, `canCancel`, `send` and `cancel`. |
| `accept?` | `string \| false` | `""` | File types the attach button offers, as for ``. `false` turns attachments off. |
| `maxFileSize?` | `number` | `10485760` | Largest file it takes, in bytes. |
| `commands?` | `LoomCommand[]` | - | Slash commands. Without them, `/` is plain text. |
| `searchMentions?` | `(query, { signal }) => LoomMention[] \| Promise` | - | Finds what `@` can mention. Without it, `@` is plain text. |
| `voice?` | `boolean \| { transcribe }` | `true` | Dictation with the browser's speech recognition, hidden where there is none. `{ transcribe }` records audio for your own speech-to-text instead. `false` hides it. |
| `placeholder?` | `string` | - | |
| `autoFocus?` | `boolean` | - | |
| `controller?` | `LoomComposerController` | - | From `createLoomComposerController()`: `setText` and `focus` from elsewhere. |
### Slash commands and mentions
A command is sent to the agent with the message, unless it has `run`, which the app runs instead. Its `arguments` are asked for in order after it's picked, with ghost text at the caret and suggestions from `options`.
```tsx
chat.newSession() },
]}
searchMentions={async (query, { signal }) => {
const res = await fetch(`/api/people?q=${encodeURIComponent(query)}`, { signal });
return res.json(); // [{ id, label, description? }]
}}
/>
```
The message keeps the text as typed, such as `/tone formal` or `@Ama Owusu`. What was picked travels beside it as the turn's `clientContext`, which eve shows the model for that turn only:
```json
{
"command": { "name": "tone", "arguments": { "tone": "formal" } },
"mentions": [{ "id": "u_ama", "label": "Ama Owusu" }]
}
```
Only what's still in the message is sent: a mention that was deleted before sending is left out.
### Dictation
With `voice` on, the composer uses the browser's speech recognition, which most Chromium browsers and Safari have. Pass `transcribe` to use your own speech-to-text everywhere: the composer records with the microphone and adds the text you return.
```tsx
{
const res = await fetch("/api/transcribe", { method: "POST", body: audio });
return (await res.json()).text;
},
}}
/>
```
## Command palette
`LoomCommandPalette` lists every slash command in a searchable dialog, for people who don't know what to type after `/`. The thread adds it, with a header button, whenever the composer has commands. `commandShortcut` opens it from the keyboard:
```tsx
```
Commands with `run` run at once. The rest, and any that ask for a required argument, are put in the composer as `/name ` to finish there. On its own, share a controller with a trigger of your own:
```tsx
const [palette] = useState(createLoomCommandPaletteController);
Commands composer.setText(`/${command.name} `)} />
```
## Agent picker
`LoomAgentPicker` chooses which agent the thread talks to: a button with the current agent that opens a searchable list. Your app passes the agents in. Put it in the thread's title:
```tsx
const agents = [
{ id: "support", name: "Support", description: "Orders and refunds" },
{ id: "billing", name: "Billing", description: "Invoices and payments" },
];
const [agent, setAgent] = useState("support");
const chat = useLoomEve({ agent });
}
/>
```
eve reads `agent` when a session starts, so give the thread a `key={agent}` to start a fresh conversation with the new agent.
## Session list
`LoomSessionList` lists past conversations, grouped into Today, Yesterday, Previous 7 days and Older, with buttons for a new conversation and to delete one. The [page layout](/docs/layouts#page) shows it as its sidebar when you pass `sessions`.
| Prop | Type | Default | Description |
| - | - | - | - |
| `sessions` | `{ id, title, updatedAt }[]` | - | `updatedAt` is a `Date`, a timestamp in ms, or an ISO string. Sorted newest first for you. |
| `currentId?` | `string` | - | The conversation on screen, marked as current. |
| `onSelect` | `(id) => void` | - | |
| `onNew?` | `() => void` | - | Shows the New conversation button. |
| `onDelete?` | `(id) => void` | - | Shows a delete button on each row. |
eve's client doesn't list sessions, so the list comes from your own store. Save a conversation once its first message is accepted, using the session id from eve's binding:
```tsx
function Conversation({ saved, onStarted }) {
const chat = useLoomEve(saved ? { initialSession: { sessionId: saved.id, streamIndex: 0 }, resume: true } : {});
const sessionId = chat.agent.session?.sessionId;
const first = chat.messages.find((m) => m.role === "user");
useEffect(() => {
if (!saved && sessionId && first) onStarted({ id: sessionId, title: titleFrom(first), updatedAt: Date.now() });
}, [saved, sessionId, first]);
return ;
}
```
To switch conversations, remount the thread with the chosen session. `streamIndex: 0` with `resume` replays it from the start, so its whole history shows:
```tsx
const [sessions, setSessions] = useState(loadSessions);
const [current, setCurrent] = useState();
setCurrent(undefined)}
onDelete={(id) => setSessions((all) => all.filter((s) => s.id !== id))}
/>
s.id === current)}
onStarted={(s) => (setSessions((all) => [s, ...all]), setCurrent(s.id))}
/>
```
Keep the list wherever suits your app: `localStorage` for a demo, or a table keyed by user on your server, written from an API route when a session starts.
## Status
- `LoomActivityLine` says what the agent is doing: thinking, using a tool, or waiting on you. It renders nothing while idle.
- `LoomErrorNotice` shows the latest error, with an optional `onRetry` action.
- `LoomEmptyState` is the greeting and starter prompts.
## Labels
Every text the kit shows can be replaced, to translate it or change its tone. Pass `labels` to a thread or layout, or wrap your own composition in `LoomProvider`:
```tsx
```
See `defaultLabels` in `lib/loom/context.tsx` for the full list.
---
# Connect eve
Source: https://loom.mkhonta.com/docs/eve
`useLoomEve` wraps eve's `useEveAgent` and returns a `LoomChat`: the conversation, what the agent is doing, and the commands to change it. Pass the chat to a [thread](/docs/components#thread) or any [layout](/docs/layouts).
```tsx
"use client";
import { LoomWidget } from "@/components/loom/widget";
import { useLoomEve } from "@/lib/loom/eve";
export function Assistant() {
const chat = useLoomEve({ agent: "support" });
return ;
}
```
It comes with the `eve` item:
```bash
npx shadcn@latest add https://loom.mkhonta.com/r/eve.json
```
## Options
`useLoomEve` takes exactly the options of `useEveAgent` from `eve/react`, such as `agent` for a named agent, `baseUrl` for an eve server elsewhere, `auth` and `headers`, `resume` with `initialSession`, and the `onEvent`, `onFinish` and `onError` callbacks. See eve's documentation for each one.
## What it returns
| Prop | Type | Default | Description |
| - | - | - | - |
| `messages?` | `readonly LoomMessage[]` | - | The conversation. Each message has a role and its parts: text, reasoning, files, tool calls and interactions. eve's messages pass through as they are. |
| `status?` | `"idle" \| "busy" \| "resuming"` | - | Busy while a send, an answer or the agent's work is pending. Resuming while an attached session catches up; the composer disables sending. |
| `activity?` | `LoomActivity` | - | What the agent is doing right now: thinking, calling tools by name, waiting on a person, compacting, or idle. |
| `error?` | `Error \| undefined` | - | The latest failure. |
| `canCancel?` | `boolean` | - | A turn is running or waiting on a person, so it can be cancelled. |
| `send?` | `(message, options?) => Promise` | - | Sends text, or text and files. While a turn runs, `{ turnPolicy: "queue" }` waits for it and `"steer"` redirects it. `clientContext` adds context the model sees for this turn only; the composer sends mentions and slash commands this way. |
| `respond?` | `(answers) => Promise` | - | Answers open interactions: `{ interactionId, optionId?, text? }`. |
| `cancel?` | `() => Promise` | - | Cancels the active turn. |
| `newSession?` | `() => void` | - | Starts a fresh conversation. |
| `agent?` | `UseEveAgentReturn` | - | eve's full binding, for anything the kit doesn't cover: `events`, `view`, `resume`, `compact`, `end`. |
## Without eve
Components only ever see a `LoomChat`, so anything that produces one can drive them: a test, a preview, a scripted demo, or another backend. The types live in `@/lib/loom/types`.
```tsx
import type { LoomChat } from "@/lib/loom/types";
const preview: LoomChat = {
messages: [{ id: "1", role: "user", parts: [{ type: "text", text: "Hi" }] }],
status: "idle",
activity: { kind: "idle" },
error: undefined,
canCancel: false,
send: async () => undefined,
respond: async () => undefined,
cancel: async () => undefined,
newSession: () => {},
};
```
:::tip
The demo on Loom's home page is a `LoomChat` driven by timers, rendering the same components you install.
:::
---
# Installation
Source: https://loom.mkhonta.com/docs/installation
Loom installs through the shadcn CLI. You need a React 19 app with Tailwind CSS v4 and a `components.json`. If your app doesn't have one yet, run `npx shadcn@latest init` first.
## Set up with a coding agent
**Add **Loom** to this app**
> Add Loom, the UI kit that works with eve agents, to this app.
>
> 1. Read https://loom.mkhonta.com/docs/llms.txt, then the docs pages you need as Markdown, starting with https://loom.mkhonta.com/docs/installation.md.
> 2. Run `npx shadcn@latest add https://loom.mkhonta.com/r/thread.json https://loom.mkhonta.com/r/eve.json`. It needs a shadcn project (components.json) with Tailwind v4; run `npx shadcn@latest init` first if there isn't one.
> 3. In a client component, call `useLoomEve()` from `@/lib/loom/eve` with the same options as `useEveAgent`, and render `` from `@/components/loom/thread`.
> 4. For a panel or a floating window instead, add the `panel` or `widget` item the same way and render `` or ``.
> 5. Use only APIs that appear in the docs.
## Add the components
1. **Install the thread and the eve adapter**
The thread brings everything it renders with it: messages, tool cards, interactions, the composer, and the theme.
**pnpm**
```bash
pnpm dlx shadcn@latest add https://loom.mkhonta.com/r/thread.json https://loom.mkhonta.com/r/eve.json
```
**npm**
```bash
npx shadcn@latest add https://loom.mkhonta.com/r/thread.json https://loom.mkhonta.com/r/eve.json
```
**bun**
```bash
bunx shadcn@latest add https://loom.mkhonta.com/r/thread.json https://loom.mkhonta.com/r/eve.json
```
2. **Render it**
```tsx title="app/support.tsx"
"use client";
import { LoomThread } from "@/components/loom/thread";
import { useLoomEve } from "@/lib/loom/eve";
export function Support() {
const chat = useLoomEve({ agent: "support" });
return (
);
}
```
The thread fills its container, so give the container a height.
## What gets added
```text
components/loom/ thread, message-list, message, markdown, tool,
interaction, composer, status
lib/loom/types.ts the data components render
lib/loom/context.tsx LoomProvider: labels, answers, tool renderers
lib/loom/utils.ts
lib/loom/eve.ts useLoomEve
```
The theme's tokens go into your global CSS, and the npm packages the components use are installed for you: `eve`, `streamdown`, `lucide-react`, and `@ui-sdk/react` with `@ui-sdk/core`.
:::note[Streamdown's styles]
Replies render with [Streamdown](https://streamdown.ai), which styles its output with Tailwind classes. The install adds `@source "../node_modules/streamdown/dist/*.js";` to your CSS. That path assumes your CSS file sits one folder below `node_modules`, as `app/globals.css` does. If yours is deeper, such as `src/app/globals.css`, add a `../` for each extra level.
:::
## Shorter commands with a namespace
Register Loom once in `components.json`, then add items by name:
```json title="components.json"
{
"registries": {
"@loom": "https://loom.mkhonta.com/r/{name}.json"
}
}
```
```bash
npx shadcn@latest add @loom/widget @loom/panel
```
## Items
Each item installs on its own, along with the items it needs.
| Item | What it adds |
| --- | --- |
| `thread` | The whole conversation, and everything below it except the layouts, agent picker and session list |
| `eve` | `useLoomEve` |
| `panel`, `widget`, `inline`, `page` | [Layouts](/docs/layouts) around the thread. `page` adds the session list |
| `command-palette`, `agent-picker`, `session-list` | Slash commands in a dialog, choosing the agent, past conversations |
| `message-list`, `message`, `markdown` | The conversation's parts |
| `tool`, `interaction` | Tool cards, approvals, questions and sign-ins |
| `composer`, `status` | The message box, activity line, error notice and empty state |
| `core` | Types, `LoomProvider` and utilities |
| `theme` | The `loom-*` tokens |
---
# Layouts
Source: https://loom.mkhonta.com/docs/layouts
Each layout wraps a [thread](/docs/components#thread) and takes all of its props, so `chat`, `title`, `empty`, `tools` and `labels` work the same everywhere.
| Layout | Item | Use it for |
| --- | --- | --- |
| `LoomPanel` | `panel` | A panel docked to the side, beside the page |
| `LoomWidget` | `widget` | A floating window from a corner launcher |
| `LoomInline` | `inline` | A card inside a page |
| `LoomPage` | `page` | The agent as the whole page |
## Panel
Docked to the end of the page (the right, in left-to-right languages). The page stays usable while it's open, and on phones it can be swiped away.
```bash
npx shadcn@latest add https://loom.mkhonta.com/r/panel.json
```
```tsx
"use client";
import { LoomPanel, LoomPanelTrigger, createLoomPanelController } from "@/components/loom/panel";
import { useLoomEve } from "@/lib/loom/eve";
import { useState } from "react";
export function Assistant() {
const chat = useLoomEve({ agent: "support" });
const [panel] = useState(createLoomPanelController);
return (
<>
Ask support
>
);
}
```
| Prop | Type | Default | Description |
| - | - | - | - |
| `side?` | `"start" \| "end"` | `"end"` | The edge it docks to, following the writing direction. |
| `width?` | `number` | `420` | Width in pixels on screens wide enough for it. |
| `launcher?` | `boolean` | `false` | Shows a floating button that opens it. |
| `shortcut?` | `string` | - | Keyboard shortcut that toggles it, like `"mod+k"`: ⌘ on Apple platforms, Ctrl elsewhere. |
| `controller?` | `LoomPanelController` | - | Shares open state with your own triggers. Create one with `createLoomPanelController()`. |
| `open?` | `boolean` | - | Controls whether it's open. |
| `defaultOpen?` | `boolean` | - | |
| `onOpenChange?` | `(open: boolean) => void` | - | |
## Widget
A floating window above the page, opened from a launcher in the corner. It stays open while people use the page behind it, keeps its conversation while closed, and becomes a sheet on small touch screens.
```bash
npx shadcn@latest add https://loom.mkhonta.com/r/widget.json
```
```tsx
```
To open it from your own button as well, share a controller the same way as the panel's: `createLoomWidgetController()` and `LoomWidgetTrigger`. Set `launcher={false}` to open it only from your own buttons.
| Prop | Type | Default | Description |
| - | - | - | - |
| `position?` | `"bottom-right" \| "bottom-left"` | `"bottom-right"` | Corner for the launcher and the window. |
| `launcher?` | `boolean` | `true` | Shows the floating launcher. |
| `icon?` | `ReactNode` | - | The launcher's icon. |
| `shortcut?` | `string` | - | Keyboard shortcut that toggles it. |
| `controller?` | `LoomWidgetController` | - | Shares open state with your own triggers. |
| `open?` | `boolean` | - | |
| `defaultOpen?` | `boolean` | - | |
| `onOpenChange?` | `(open: boolean) => void` | - | |
## Inline
The agent in a card of its own, for a help page, a dashboard tile or a modal. It's 600px tall by default; set the height with `className`.
```tsx
```
## Page
The agent as the whole page, with past conversations beside it. It fills its container, so give that the height. The sidebar hides on small screens.
Pass `sessions` and the sidebar is a [session list](/docs/components#session-list) with those props:
```tsx
setCurrentId(undefined) }}
/>
```
For a sidebar of your own, pass `sidebar` instead:
```tsx
} />
```
---
# Theming
Source: https://loom.mkhonta.com/docs/theming
Every color, radius, shadow and curve in the kit comes from a `--loom-*` CSS variable. The `theme` item adds them to your global CSS under `:root` and `.dark`, and maps them into Tailwind, so components use classes like `bg-loom-surface`, `text-loom-muted` and `rounded-loom`. Change a token and every component follows.
The `loom-` prefix keeps the kit's tokens apart from your app's own shadcn tokens, so neither overrides the other.
## Tokens
| Token | Used for |
| --- | --- |
| `--loom-bg` | The thread's background |
| `--loom-fg` | Text |
| `--loom-muted` | Secondary text, icons |
| `--loom-subtle` | Code, hover fills, quiet surfaces |
| `--loom-surface` | Cards: tool calls, interactions, the composer |
| `--loom-border` | Borders and dividers |
| `--loom-ring` | Focus rings |
| `--loom-accent`, `--loom-accent-fg` | Primary actions, the send button, the launcher. Ink by default |
| `--loom-accent-soft` | Quiet fills |
| `--loom-user`, `--loom-user-fg` | The person's own messages |
| `--loom-success`, `--loom-warning`, `--loom-danger` | Call and interaction states |
| `--loom-danger-soft` | A quiet error fill, for your own parts |
| `--loom-signal`, `--loom-signal-fg` | One loud color, for the moments you want noticed; the kit itself uses it sparingly |
| `--loom-shadow` | Floating surfaces: the widget, the composer |
| `--loom-radius`, `--loom-radius-sm` | Containers and controls |
| `--loom-ease` | Every transition's curve |
## Change the theme
Edit the values the install added to your CSS, or override them after:
```css title="app/globals.css"
:root {
--loom-accent: oklch(0.55 0.17 160);
--loom-accent-fg: oklch(0.99 0 0);
--loom-radius: 0.5rem;
}
.dark {
--loom-accent: oklch(0.75 0.14 160);
--loom-accent-fg: oklch(0.16 0 0);
}
```
To match your app's existing shadcn theme instead, point Loom's tokens at yours:
```css title="app/globals.css"
:root {
--loom-bg: var(--background);
--loom-fg: var(--foreground);
--loom-muted: var(--muted-foreground);
--loom-border: var(--border);
--loom-accent: var(--primary);
--loom-accent-fg: var(--primary-foreground);
}
```
## Dark mode
The dark values live under `.dark`, the class shadcn apps toggle. If your app switches themes another way, such as a `data-theme` attribute, move the dark block under that selector.
## Beyond tokens
The components are files in your app. For changes tokens can't make, edit them: every part also carries a `data-slot` (such as `loom-message`, `loom-tool` and `loom-composer`) and state attributes (`data-role`, `data-state`, `data-status`) to target from your own CSS.