# Installation

Install terminal components, hooks, and themes from the registry.

## Prerequisites

A project with [Ink](https://github.com/vadimdemedes/ink) set up.

## Installation

Run the following command to add any component:

```bash
npx shadcn@latest add @termcn/spinner
```

## Usage

Import and use the component:

```tsx
import { Spinner } from "@/components/ui/spinner";
import { Text } from "ink";

export function App() {
  return (
    <>
      <Text>Loading...</Text>
      <Spinner />
    </>
  );
}
```

## Install a Theme

termcn ships bundled terminal themes that integrate with the `ThemeProvider`:

```bash
npx shadcn@latest add @termcn/theme-dracula
```

Then wrap your app:

```tsx
import { ThemeProvider } from "@/components/ui/theme-provider";
import { draculaTheme } from "@/lib/terminal-themes/dracula";

export function App() {
  return (
    <ThemeProvider theme={draculaTheme}>{/* your Ink tree */}</ThemeProvider>
  );
}
```