Skip to content
MoonUIMoonUI
ComponentsTemplatesPricing
Sign inGet started

Getting started

  • Introduction
  • Installation
  • CDN
  • Authentication
  • shadcn CLI
  • MCP Server
  • Usage

Components

Foundation25 components
  • Alert
  • Aspect Ratio
  • Avatar
  • Badge
  • Button
  • Button Group
  • Checkbox
  • File Upload
  • Input
  • Kbd
  • Label
  • Radio Group
  • Rating
  • Select
  • Slider
  • Switch
  • Textarea
  • Toggle
  • Toggle Group
  • Separator
  • Tags Input
  • Color Picker
  • Date Picker
  • Simple Editor
  • Input OTP
Layout10 components
  • Accordion
  • Breadcrumb
  • Card
  • Carousel
  • Collapsible
  • ResizablePro
  • Scroll Area
  • StepperPro
  • Table
  • Tabs
Navigation & Overlays11 components
  • Alert DialogPro
  • Command
  • Context MenuPro
  • Dialog
  • Dropdown Menu
  • Hover CardPro
  • MenubarPro
  • Pagination
  • Popover
  • SheetPro
  • Tooltip
Feedback4 components
  • Progress
  • Skeleton
  • Spinner
  • Toast
Data & Analytics4 components
  • Data TablePro
  • Advanced ChartPro
  • DashboardPro
  • WidgetsPro
Navigation4 components
  • Command AI+Pro
  • SidebarPro
  • NavbarPro
  • Navigation MenuPro
AI Chat4 components
  • MessagePro
  • Message ScrollerPro
  • AttachmentPro
  • Conversation MarkerPro
Content Management6 components
  • Advanced FormsPro
  • Form WizardPro
  • Quiz FormPro
  • Credit Card InputPro
  • Phone Number InputPro
  • Rich Text EditorPro
Project Management3 components
  • KanbanPro
  • TimelinePro
  • CalendarPro
Performance & Utility8 components
  • Virtual ListPro
  • Memory Efficient DataPro
  • Lazy ComponentPro
  • Optimized ImagePro
  • Performance MonitorPro
  • Performance DebuggerPro
  • Error BoundaryPro
  • Health CheckPro
Interactive & Animation15 components
  • Animated NumberPro
  • Floating DockPro
  • Text RevealPro
  • Image ComparePro
  • Splash CursorPro
  • GitHub StarsPro
  • Animated ButtonPro
  • Magnetic ButtonPro
  • Magnetic ElementsPro
  • Mouse TrailPro
  • Hover Card 3DPro
  • Spotlight CardPro
  • Floating Action ButtonPro
  • LightboxPro
  • Media GalleryPro
Gesture & Touch7 components
  • Swipeable CardPro
  • Draggable ListPro
  • Pinch ZoomPro
  • Swipe ActionsPro
  • Gesture DrawerPro
  • Click AnimationsPro
  • Touch GesturesPro
Text Animations12 components
  • Text HighlighterPro
  • Typewriter TextPro
  • Scrambled TextPro
  • Word RotatePro
  • Morphing TextPro
  • Flip TextPro
  • Number TickerPro
  • Glitch TextPro
  • Shiny TextPro
  • Wavy TextPro
  • Gradient TextPro
  • Text 3DPro
Animations12 components
  • Animated ListPro
  • Bounce EffectPro
  • Blur FadePro
  • Elastic AnimationPro
  • MarqueePro
  • Parallax ScrollPro
  • Reveal CardsPro
  • Scroll RevealPro
  • Fade TransitionsPro
  • Focus TransitionsPro
  • Path AnimationsPro
  • SVG AnimationsPro
Layouts1 components
  • Bento GridPro
Effects9 components
  • ConfettiPro
  • Cursor TrailPro
  • Glow EffectPro
  • Pixel ImagePro
  • Neon EffectPro
  • ShimmerPro
  • RipplePro
  • SparklesPro
  • SpotlightPro
Backgrounds17 components
  • Grid PatternPro
  • MeteorsPro
  • Aurora BackgroundPro
  • ParticlesPro
  • StarfieldPro
  • Dot PatternPro
  • Grid DistortionPro
  • WavesPro
  • Matrix RainPro
  • Liquid BackgroundPro
  • Mesh GradientPro
  • Glitch BackgroundPro
  • Gradient FlowPro
  • Floating ElementsPro
  • Bubble BackgroundPro
  • Geometric PatternsPro
  • Code SnippetsPro
Special UI1 components
  • Glow CardPro
Showcase8 components
  • iPhone MockPro
  • Android MockPro
  • Safari MockPro
  • GlobePro
  • Dotted MapPro
  • Icon CloudPro
  • Tweet CardPro
  • File TreePro

Advanced

  • Theming
  • Customization
  • CLI
  • Help & Support

Installation

Get started with MoonUI in your React or Next.js project. Choose between our CLI tool for automatic setup or manual installation.

Prerequisites

Make sure you have these installed before proceeding

React 18+

or Next.js 13+

Tailwind CSS v3

For styling system

Node.js 16+

LTS recommended

Quick tip: Run node -v and npm -v in your terminal to verify versions.
1

Install MoonUI CLI globally

terminal
$ npm install -g @moontra/moonui-cli
2

Initialize MoonUI in your project

terminal
$ moonui init

This will create a moonui.config.js file and set up your project with Tailwind CSS.

3

Add components to your project

terminal
$ moonui add button card dialog

You're ready!

Start using MoonUI components in your project

Pro Tip
Use moonui add --all to add all free components at once
Installing Pro components?
Premium components live in @moontra/moonui-pro and unlock with a license key. Set MOONUI_LICENSE_KEY at build time and wrap your config with withMoonUIProToken. The Authentication & Pro setup guide covers Vercel, Docker, Kubernetes, Dokploy and self-hosted deployments — the same steps everywhere.

Post Installation

Configure your project after installation

1. Configure Tailwind CSS

Add the MoonUI preset to your tailwind.config.js. The preset maps Tailwind's color, radius, and font scales onto MoonUI's CSS variables — without it, utilities like bg-primary are never generated and components render with no colors.

tailwind.config.js
module.exports = {
  presets: [require("@moontra/moonui/tailwind-preset")],
  content: [
    "./src/**/*.{ts,tsx}",
    "./node_modules/@moontra/moonui/dist/**/*.{js,mjs}"
  ],
  plugins: [require("tailwindcss-animate")]
}

Everything the preset sets is still yours to override — add your own theme.extend block and it wins.

2. Add Global Styles

Import MoonUI's design tokens from your root layout (or entry file). This single import defines every CSS variable the components read — --primary, --border, --ring and the rest — for both light and dark mode.

globals.css
@tailwind base;
@tailwind components;
@tailwind utilities;
Components read unprefixed variables such as hsl(var(--primary)). Without this import they render with no colors. To override a token, redeclare it in your own :root block after the import.

Add this line to your root layout (Next.js) or main.jsx (Vite). It is the only form measured to work on Next.js, Next.js with postcss-import and Vite. Prefer CSS? The @import specifier depends on your setup — see the table in the package README.

app/layout.tsx
import "@moontra/moonui/tokens.css";

3. Setup Utils

Create a lib/utils.ts file:

lib/utils.ts
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

Browse Components

Explore our collection of 168 components

Customize Theme

Learn how to customize MoonUI to match your brand

MoonUIMoonUI

168 React components. 45 free under MIT, 123 Pro.

Unsubscribe anytime.

Product

  • Components
  • Templates
  • Pricing

Resources

  • Documentation
  • GitHub
  • Support

Legal

  • Privacy
  • Terms
  • Refund Policy
Made by Moontra Software
  • X
  • LinkedIn
  • GitHub
  • YouTube