# Blocks

> Ready-made sections and pages for shadcn/ui. Preview them on the site, install them with the shadcn CLI and edit them like your own code.

## Browse blocks

The [Blocks](https://pro.shadcn.co/pro-blocks) page has all 439 blocks in 61 categories, grouped into User Interface, Landing Page and eCommerce. Each block has:

- **Preview**: the working block, with desktop, tablet and mobile widths.
- **Code**: its source files. Free blocks show their code to everyone, the rest once you're logged in with an active plan.
- **Install command**: the button with the block's id, such as `@shadcnpro/pricing-01`, copies the command that installs it.

## Install blocks

Set up the registry once per project, as described in [Installation](https://pro.shadcn.co/docs/installation). Then add blocks by id:

```bash
npx shadcn@latest add @shadcnpro/pricing-01
```

To install several blocks, list their ids:

```bash
npx shadcn@latest add @shadcnpro/navbar-01 @shadcnpro/pricing-01 @shadcnpro/faq-01 @shadcnpro/footer-01
```

For each block, the CLI:

- writes the block to `components/blocks/<id>.tsx`. Larger blocks get a folder, `components/<id>/`, and full-page blocks such as dashboards also add their page file.
- adds the shadcn/ui components the block uses to `components/ui`.
- installs the npm packages it needs.

The CLI asks before it overwrites a file that already exists. To preview the changes without writing anything, add `--dry-run`.

## UI libraries

shadcn/ui builds its components on Radix UI, Base UI or React Aria, depending on the style in your `components.json`. Every block comes in all three versions:

- **Installing**: `npx shadcn@latest add @shadcnpro/<id>` installs the version for your project's style. `base-*` styles get Base UI, `aria-*` styles get React Aria and every other style gets Radix UI.
- **A specific version**: prefix the id with the library, such as `@shadcnpro/base/pricing-01` or `@shadcnpro/aria/pricing-01`.
- **Previewing**: the switch at the top of each category on the [Blocks](https://pro.shadcn.co/pro-blocks) page shows the preview and code for each library.

The library is picked through `{style}` in the registry URL, so projects set up before it was added install Radix UI. Update the URL as shown in [Installation](https://pro.shadcn.co/docs/installation) to get the other versions.

## Use a block

Import the block and render it where it belongs:

```tsx title="app/page.tsx"
import Faq01 from '@/components/blocks/faq-01';

export default function Page() {
  return (
    <main>
      <Faq01 />
    </main>
  );
}
```

A few older blocks, including the pricing, sign-in and sign-up blocks, use a named export instead: `import { Pricing01 } from '@/components/blocks/pricing-01'`.

## Customize a block

Blocks are plain React and Tailwind CSS in your repository, so you can change anything:

- **Content**: replace the placeholder text, links and images, and add or remove items. Lists such as plans, FAQ entries and menu links usually sit at the top of the file.
- **Colors, fonts and radius**: change the theme, not the block. Blocks only use semantic classes such as `bg-background`, `text-muted-foreground` and `bg-primary`, so they follow your theme and dark mode. See [Themes](https://pro.shadcn.co/docs/themes).
- **Layout**: edit the Tailwind classes. Blocks are responsive, so check your changes at mobile width too.

## Update a block

Installed blocks never change on their own. To see what's different in the latest version, run `add` with `--diff`. It prints the changes without writing anything:

```bash
npx shadcn@latest add @shadcnpro/pricing-01 --diff
```

To replace your copy with the latest version, run the same command with `--overwrite` instead. Your edits to that block are lost.

## Free blocks

62 of the 439 blocks are free: their code is open to everyone and they install without a license key. Most categories include one. To use only free blocks, register the registry without a key, as shown in [Free blocks without a license key](https://pro.shadcn.co/docs/installation#free-blocks-without-a-license-key).

## Install blocks from your AI editor

With the [MCP server](https://pro.shadcn.co/docs/mcp/introduction) connected, you don't need to look up ids or copy commands. Describe what the section should do and your agent finds the right block, installs it after you approve, and adds it to the page:

- Add a pricing section with three plans and a monthly/yearly toggle under the hero.
- Add an FAQ section above the footer with questions about billing, refunds and team seats.
- Replace the hero with a split layout: headline and email signup on the left, product screenshot on the right.
- Build a sign-in page with Google and GitHub buttons and a link to sign up.

For prompts that plan whole pages, apply themes or find icons, see [Prompts](https://pro.shadcn.co/docs/mcp/prompts).

## Blocks in Figma

Every block has a matching design in the [Figma kit](https://pro.shadcn.co/docs/figma-kit), so a page designed with kit blocks is built from the same blocks in code.
