# Installation

Install components from Pratik's Lab with the shadcn CLI.

> 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]

Use an existing React project initialized for shadcn. The CLI reads your `components.json` and installs files into its configured aliases.

If your project is not initialized yet:

```shell
pnpm dlx shadcn@latest init
```

## Install an item [#install-an-item]

Pass an item's complete registry URL to the CLI. Install the complete foundation collection with:

```shell
pnpm dlx shadcn@latest add https://lab.pratikthapw.dev/r/foundation.json
```

Or install one item independently:

```shell
pnpm dlx shadcn@latest add https://lab.pratikthapw.dev/r/button.json
```

The CLI shows the files and dependencies it will add. Existing files are not silently replaced; review conflicts and diffs before updating a customized component.

## Inspect before installing [#inspect-before-installing]

Use `view` to inspect the built item or `add --dry-run` to preview its effect on your project:

```shell
pnpm dlx shadcn@latest view https://lab.pratikthapw.dev/r/button.json
pnpm dlx shadcn@latest add https://lab.pratikthapw.dev/r/button.json --dry-run
```

## Import the result [#import-the-result]

```tsx
import { Button } from "@/components/ui/button";

export function SaveAction() {
  return <Button>Save changes</Button>;
}
```

Visit the component page for its full API, composition examples, and boundary notes.
