Getting Started
Installation
Set up Spectrum UI in a new or existing Next.js project. It only takes a few minutes.
Using Next.js 15 with React 19? Read the Next.js 15 and React 19 guide first.
- 1
Create a project
Start with a new Next.js project, or skip this step if you already have one.
pnpm create next-app@latest - 2
Set up shadcn/ui
Run the
initcommand. It installs the needed packages and prepares Tailwind CSS for you.pnpm dlx shadcn@latest initYou can add the
-dflag to skip the questions and use the default settings. - 3
Configure components.json
The
initcommand asks you a few questions. Your answers are saved incomponents.json.components.jsonWhich style would you like to use?›New YorkWhich color would you like to use as base color?›ZincDo you want to use CSS variables for colors?›yes - 4
Add components
That is it. You can now add any Spectrum UI component with one command. Here is an example for the Accordion.
Login to view commandCreate a free account to access the install commandThe code lands in your project, so you can import it like any of your own components.
import { Accordion } from "@/components/ui/accordion";