# Installation

How to install a component from the Motif registry into your app.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Prerequisites [#prerequisites]

Requires React (Next.js, Remix, Astro, Vite, Gatsby), [Tailwind CSS](https://tailwindcss.com/), and an initialized shadcn project:

```bash
npx shadcn@latest init
```

## Install a component [#install-a-component]

Components install into `components/ui/motif/` along with their registry dependencies:

```bash
npx shadcn@latest add https://motif.sweetretry.com/r/question-card.json
```

```tsx
import { QuestionCard } from "@/components/ui/motif/question-card";

export function Review() {
  return (
    <QuestionCard
      questions={[
        {
          id: "scope",
          title: "How focused should the first release be?",
          options: [
            { value: "focused", label: "A focused starter set" },
            { value: "broad", label: "A broader collection" },
          ],
        },
      ]}
      onSubmit={(answers) => console.log("submitted", answers)}
    />
  );
}
```

## Install a block [#install-a-block]

Blocks install a full surface and all of its underlying part components in one command:

```bash
npx shadcn@latest add https://motif.sweetretry.com/r/agent-run.json
```

## Theme tokens [#theme-tokens]

Registry items declare custom state tokens (such as `warning`) in `cssVars`, which `shadcn add` appends to `:root`, `.dark`, and `@theme` in your CSS without overwriting existing tokens.

## Browse the registry [#browse-the-registry]

- [Agents](/docs/agents) — conversation surfaces
- [Media](/docs/media) — controls and canvas pieces for generation
- [Data](/docs/data) — heatmaps, breakdowns, and dates
- [Components](/docs/components) — shared chrome
- [Playground](/playground) — assembled chat and canvas apps
