Installation
shadcn-admin-kit is a React library of components for admin apps. You can install it with any React framework:
Install with Next.js
Section titled “Install with Next.js”The first step is to create a new Next.js project using the create-next-app command. Name your app ‘e.g., my-app, and answer Yes to the question about recommended Next.js defaults:
npx create-next-app@latest✔ What is your project named? … my-app✔ Would you like to use the recommended Next.js defaults? › Yes, use recommended defaults...Success! Created my-app at /path/to/my-appNext, go to your project directory and pull the shadcn-admin-kit components using the shadcn command:
cd my-appnpx shadcn@latest add https://marmelab.com/shadcn-admin-kit/r/admin.json✔ You need to create a components.json file to add components. Proceed? … yes✔ Which color would you like to use as the base color? › Neutral✔ Writing components.json.✔ Checking registry.✔ Updating CSS variables in app/globals.css✔ Installing dependencies.✔ Created 114 filesThis will add some components to the components/admin and components/ui directories, as well as some utilities inside the hooks/ and lib/ directories.
You’re ready to bootstrap your app. Create an app/admin directory and an app/admin/App.tsx component file that will contain the admin app.
"use client";
import { Admin } from "@/components/admin";
const App = () => <Admin></Admin>;
export default App;Expose that admin app at the /admin URL by adding a app/admin/page.tsx file. this page should dynamically import the admin component and render it with SSR disabled:
"use client";
import dynamic from "next/dynamic";
const App = dynamic(() => import("./App"), { ssr: false, // Required to avoid react-router related errors});
export default function Page() { return <App />;}Finally, run npm run dev and go to http://localhost:3000/admin to access your admin app.

Next step: Read the Quick Start Guide to learn how to use the components in your admin app.
Install with Vite.js
Section titled “Install with Vite.js”shadcn-admin-kit is built on React, so you need to create a Vite single-page app to use it.
npm create vite@latest my-app -- --template react-tsoryarn create vite my-app --template react-tsThen, cd into your new project directory and install shadcn/ui. To do so, add Tailwind CSS.
npm install tailwindcss @tailwindcss/vite# oryarn add tailwindcss @tailwindcss/viteInstall node types as a development dependency:
npm install -D @types/node# oryarn add -D @types/nodeReplace everything in src/index.css with the following:
@import "tailwindcss";Edit tsconfig.json file. Add the baseUrl and paths properties to the compilerOptions section of the tsconfig.json and tsconfig.app.json files:
{ "files": [], "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" } ], "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } }}{ "compilerOptions": { // ... "verbatimModuleSyntax": true, "verbatimModuleSyntax": false, "baseUrl": ".", "paths": { "@/*": [ "./src/*" ] }, }}Add the following code to the vite.config.ts so your app can resolve paths without error:
import path from "path"import tailwindcss from "@tailwindcss/vite"import react from "@vitejs/plugin-react"import { defineConfig } from "vite"
// https://vite.dev/config/export default defineConfig({ plugins: [react()], plugins: [react(), tailwindcss()], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, },})Now, run the shadcn init command to setup your project:
npx shadcn@latest init# oryarn shadcn initYou will be asked a few questions to configure components.json.
You can now start adding components to your project. Let’s start with the shadcn-admin-kit components.
npx shadcn@latest add https://marmelab.com/shadcn-admin-kit/r/admin.jsonThe main entry point of your new application is main.tsx, which renders the App component into the DOM.
import { StrictMode } from "react";import { createRoot } from "react-dom/client";import "./index.css";import App from "./App.tsx";
createRoot(document.getElementById("root")!).render( <StrictMode> <App /> </StrictMode>,);The <App> component currently renders a default Vite application. You can replace all its content by the following to serve your new shadcn-admin-kit application.
import { Admin } from "@/components/admin";
const App = () => <Admin></Admin>;
export default App;It’s time to test! Run the following command to run your project.
npm run dev# oryarn devYou should see this:

Next step: Read the Quick Start Guide to learn how to use the components in your admin app.