Skip to content

shadcn/ui for Next.js, server components first

In the App Router a component is a server component until it says otherwise. Our blocks follow that: 584 have no state and stay on the server, and the 247 that do (tabs, switches, carousels) start with "use client". You install them into your app, not a starter you have to untangle.

server-component blocks
584
client blocks, marked
247
Next.js + Sanity themes in Complete
26

Blocks that need “use client”

These hold state, a billing switch or a tab set, so they run in the browser. The directive is already at the top of the file.

Keep the key out of the repository

The registry reads your API key from THEMESDEV_TOKEN. Put it in .env.local for your machine and in your CI secrets, never in components.json, so a public repository never carries it.

terminal
export THEMESDEV_TOKEN=tdk_…   # from your account
npx shadcn@latest add @themesdev/pricing-02

Themes with a CMS

UI Pro Complete adds the Next.js + Sanity edition of all 26 website themes: the App Router site, the Sanity Studio and its schemas, so editors change pages without a deploy from you.

How it works with shadcn

From the catalogue to your components folder

  1. Add the registry

    Once per project: the @themesdev entry in components.json, with your API key read from THEMESDEV_TOKEN. Making a key takes a free themes.dev account.

    components.json
    {
      "registries": {
        "@themesdev": {
          "url": "https://www.themes.dev/r/ui/{name}.json",
          "headers": { "Authorization": "Bearer ${THEMESDEV_TOKEN}" }
        }
      }
    }
  2. Install by number

    Every item has a store number. This one is pricing-02 (Deskside); the CLI adds the shadcn/ui parts it needs first.

    terminal
    npx shadcn@latest add @themesdev/pricing-02
  3. Edit it as your code

    The file lands in components/pricing/ in your project. No package, no runtime, no lock-in: change the markup, the copy and the classes like anything else you wrote.

See it on the item’s own page: pricing-02 (Deskside). Set up your key in your account.

Questions

About shadcn + Next.js

Asked by people who were looking for the same thing. Something missing? Send us a message; we answer every one ourselves.

  • Do the blocks work with the Pages Router?

    Yes. They are plain React components; "use client" is ignored outside the App Router.

  • Which Next.js version do I need?

    One the current shadcn/ui CLI supports, with Tailwind CSS v4. The themes’ Next.js editions pin their own versions in their repositories.

  • What is the difference between UI Pro and Complete for Next.js?

    Both have every block, app screen and page template, which work in Next.js. Complete, from €299, adds the Next.js + Sanity edition of every website theme.

  • Do I get the code or an npm package?

    The code. The CLI writes each block into your project; there is no package to update or lock you in.

Frank Spin

Not sure it fits?

Tell us what you are building and we tell you honestly whether these blocks are a good fit.

Frank Spin · Founder of themes.devSend a messageEvery message reaches him directly

UI Pro

Build it from finished shadcn/ui blocks

Every block, page template and website theme from €199, paid once, with every update and everything we add later. Not ready? The free blocks are open to everyone.

blocks
860
page templates
14
website themes
26
The About page template from UI Pro, built from its blocks.

This page is built from UI Pro blocks: Straalnet (faq-10), Rooilijn (call-to-action-07).

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans