---
title: Installation
description: Add Loom's components to an app with shadcn and Tailwind v4, then connect them to your agent.
---

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 `<LoomThread chat={chat} />` from `@/components/loom/thread`.
> 4. For a panel or a floating window instead, add the `panel` or `widget` item the same way and render `<LoomPanel chat={chat} />` or `<LoomWidget chat={chat} />`.
> 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 (
        <div className="h-dvh">
          <LoomThread chat={chat} title="Support" />
        </div>
      );
    }
    ```

    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 |
