Components built to last.
A set of beautifully designed, accessible components you can copy, customize, and build on. No npm install. Just code you own.
import { Button } from "@nexui/react"
export default function App() {
return (
<Button variant="default">Get started</Button>
)
}Components
Everything you need.
40+ components ready to copy into your project. Each one is accessible, responsive, and built with Tailwind CSS.
Trigger actions with multiple variants and sizes.
Small status indicators and labels.
Text fields for capturing user input.
Alex Chen
Product Designer
"NexUI components saved us weeks of work. Clean and easy to customize."
Container for grouping related content.
New release
NexUI v1.0 is now available.
Error
Something went wrong. Please retry.
Communicate important messages inline.
User profile pictures with fallback initials.
Temporary notifications at the edge of the screen.
Segmented navigation between related views.
And many more — dialogs, dropdowns, tables, calendars, data pickers, and more coming soon.
Installation
Up and running in minutes.
No package to install. No version conflicts. Just copy the component code into your project and make it your own.
Initialize your project
Start with a new Next.js or Vite project, or use an existing one.
npx create-next-app@latest my-app --typescript --tailwindCLI
One command away.
Use the NexUI CLI to initialize your project and pull any component straight into your codebase — no copy-paste required.
Config file
// nexui.config.ts
import type { NexUIConfig } from "nexui"
export default {
outputDir: "components/ui",
utils: "lib/utils.ts",
style: "minimal", // "minimal" | "rounded" | "sharp"
typescript: true,
} satisfies NexUIConfignexui init
Scaffolds a nexui.config.ts, installs the utils helper, and sets up CSS variables in your project. Run this once.
Tip — You can also run npx nexui@latest add with no arguments and the CLI will show an interactive picker.
CLI vs Manual
Theming
Make it yours.
All components use CSS custom properties. Swap your accent color, tweak the radius, and the entire system updates instantly.
Preset themes
CSS variables — one file, full control
:root {
--background: oklch(0.09 0 0);
--foreground: oklch(0.96 0 0);
--primary: oklch(0.65 0.17 160); /* ← swap this */
--primary-foreground: oklch(0.98 0 0);
--border: oklch(0.22 0 0);
--muted: oklch(0.16 0 0);
--muted-foreground: oklch(0.52 0 0);
--radius: 0.5rem;
}Code
Copy. Paste. Ship.
Every component is a single file. No abstractions, no magic — just clean TypeScript you can read and modify.
import { cn } from "@/lib/utils"
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive"
size?: "sm" | "md" | "lg"
}
export function Button({
variant = "default",
size = "md",
className,
...props
}: ButtonProps) {
return (
<button
className={cn(
"inline-flex items-center justify-center rounded-md font-medium transition-colors",
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
"disabled:pointer-events-none disabled:opacity-50",
size === "sm" && "text-xs px-3 py-1.5",
size === "md" && "text-sm px-4 py-2",
size === "lg" && "text-base px-6 py-3",
variant === "default" && "bg-primary text-primary-foreground hover:bg-primary/90",
variant === "secondary" && "bg-secondary text-secondary-foreground hover:bg-secondary/80",
variant === "outline" && "border border-border hover:bg-secondary",
variant === "ghost" && "hover:bg-secondary text-muted-foreground hover:text-foreground",
variant === "destructive" && "bg-destructive/15 text-destructive hover:bg-destructive/25",
className
)}
{...props}
/>
)
}