Installation
One command in your Next.js project. It installs Tailwind CSS v4 if you don't have it, and nothing is copied component by component.
pnpm dlx sidedish initUsing npm, yarn or bun? Run npx sidedish init, yarn dlx sidedish init or bunx sidedish init.
That's it.Every component is ready to use in Server and Client Components. Start the dev server and write
<button data-tone="good">Hello</button>.What init does
| Step | Detail |
|---|---|
| Installs packages | sidedish, tailwindcss, @tailwindcss/postcss and postcss, with pnpm, npm, yarn or bun picked from your lockfile. |
Adds postcss.config.mjs | Only if you don't already have a PostCSS config. |
Patches globals.css | Adds @import "tailwindcss" (if missing) and @import "sidedish/sidedish.css". |
Patches app/layout.tsx | Imports globals.css and adds <Sidedish /> inside <body>. Works with src/app and .jsx/.js too. |
| Loads fonts | DM Sans and Red Hat Mono. Skip with --no-fonts. |
| TypeScript | Types for <sd-*> tags and style={{ "--tone": … }} come with the package. |
Your layout afterwards
/* app/globals.css */
@import "sidedish/fonts.css";
@import "tailwindcss";
@import "sidedish/sidedish.css"; /* sits in Tailwind layers: your utilities always win */// app/layout.tsx
import "./globals.css";
import { Sidedish } from "sidedish";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<Sidedish />
{children}
</body>
</html>
);
}Use it
Plain HTML tags and classes work in Server Components, and Tailwind utilities go on the same elements. You only need "use client" for toast() or event hooks.
// app/page.tsx: a Server Component
export default function Page() {
return (
<article className="card sm:max-w-md">
<header>Welcome</header>
<p>Native elements are already styled.</p>
<sd-tabs>
<nav><button>One</button><button>Two</button></nav>
<section>First panel</section>
<section>Second panel</section>
</sd-tabs>
<button data-tone="good">Continue</button>
</article>
);
}Sidedish vs shadcn/ui
| Sidedish | shadcn/ui | |
|---|---|---|
| Setup | pnpm dlx sidedish init | init, then add per component |
| Requires Tailwind | Yes (v4) | Yes |
| Files added to your repo | None (one layout edit) | One file per component |
| Runtime dependencies | 0 (Tailwind is a peer) | Radix primitives, cva, clsx and others |
| Works in Server Components | Yes, it's HTML and CSS | Interactive ones need "use client" |
| Customise | CSS variables and props | Edit the copied source |
Pick shadcn when you want to own and rewrite each component's source. Pick Sidedish when you want a full, consistent kit in one step with almost no weight.
Manual setup
pnpm add sidedishInstall tailwindcss @tailwindcss/postcss postcss if you don't have them, then add the CSS imports and <Sidedish /> as shown above. For self-hosted fonts, use next/font in place of fonts.css:
import { DM_Sans, Red_Hat_Mono } from "next/font/google";
const sans = DM_Sans({ subsets: ["latin"], variable: "--sd-font-sans" });
const mono = Red_Hat_Mono({ subsets: ["latin"], weight: ["400", "500"], variable: "--sd-font-mono" });
<html className={`${sans.variable} ${mono.variable}`}>