A high-performance, animated, and customizable UI component library for Next.js, powered by Tailwind CSS, Framer Motion, and Radix UI.
Iris UI is designed to accelerate modern web development with:
- 100+ Pre-built Components: Buttons, cards, inputs, AI blocks, and more.
- Smooth Animations: Powered by Framer Motion for micro-interactions.
- Fully Typed: Built with TypeScript for type safety.
- Dark Mode Support: Seamless theme switching with OKLCH color space.
- AI-Powered Blocks: Integrate AI chat, card generation, and more.
- Documentation Ready: Built with Fumadocs and MDX.
- Optimized for Vercel: Zero-config deployment.
- Node.js: v18 or higher.
- Package Manager:
npm,yarn,pnpm, orbun. - Next.js: v15.5.0 (used in this project).
git clone https://github.com/your-org/iris-ui.git
cd iris-uipnpm install
# or
npm install
# or
yarn installpnpm devOpen http://localhost:3000 in your browser.
sajid-tech-iris-ui/
βββ app/ # Next.js App Router (pages, layouts, API routes)
β βββ (root)/ # Root layout and homepage
β βββ api/ # API routes (e.g., `/api/search`)
β βββ docs/ # Documentation pages (MDX-powered)
β βββ preview/ # Live component previews
βββ components/ # Reusable UI components
β βββ irisui/ # Custom Iris UI components (buttons, cards, etc.)
β βββ landing/ # Landing page components (hero, footer, etc.)
β βββ mdx/ # MDX-related components (previews, refresh buttons)
β βββ nav/ # Navigation components (desktop, mobile)
β βββ ui/ # Radix UI primitives (accordion, dialog, etc.)
βββ config/ # Site and navigation configuration
βββ content/ # MDX content for documentation
βββ hooks/ # Custom React hooks (e.g., `use-auto-resize-textarea`)
βββ lib/ # Utilities and shared logic (e.g., `cn()`, `source.ts`)
βββ public/ # Static assets (images, JSON configs for components)
βββ registry/ # Component registry (auto-generated)
βββ scripts/ # Build scripts (e.g., `build-registry.ts`)
βββ .source/ # Source configuration for Fumadocs
Iris UI uses Tailwind CSS for styling. Customize the theme in:
app/globals.css: Global styles, dark mode, and animations.tailwind.config.js: Extend or override Tailwindβs default theme.
- Automatic: Uses
next-themesfor system preference detection. - Customize: Modify
globals.cssto adjust dark mode colors (OKLCH color space for accessibility).
Override styles using the cn() utility (from lib/utils.ts):
import { cn } from "@/lib/utils";
<Button
className={cn(
"bg-blue-500 hover:bg-blue-600", // Custom styles
"text-white font-medium", // Override defaults
"rounded-lg px-4 py-2" // Additional classes
)}
>
Click Me
</Button>- MDX Support: Enabled via
fumadocs-mdx. - Image Optimization: Configured for Vercel and Unsplash.
- Font Optimization: Uses
next/fontfor Geist font. - Static File Tracing: Includes
components/irisui/**/*for static exports.
Defines Radix UI and Tailwind CSS settings:
{
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "app/globals.css",
"baseColor": "zinc"
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}- TypeScript Paths: Aliases like
@/*resolve to./*. - Strict Mode: Enabled for type safety.
| Category | Components | File Path |
|---|---|---|
| Buttons | btn-01 to btn-15 (animated, interactive, themed) |
components/irisui/button/ |
| Cards | card-01 to card-10 (social, profile, project, chat) |
components/irisui/card/ |
| Inputs | input-01 to input-10 (text, OTP, search, file upload) |
components/irisui/input/ |
| Lists | list-01 to list-06 (animated, interactive) |
components/irisui/list/ |
| Pricing | pricing-01 to pricing-06 (tiered, feature-based) |
components/irisui/pricing/ |
| Text | text-01 to text-06 (typography, handwritten) |
components/irisui/text/ |
| FAQ | faq-01 to faq-04 (accordion, collapsible) |
components/irisui/faq/ |
| AI Blocks | ai-chat, ai-card-generation (multimodal, preview) |
components/irisui/blocks/ |
| Icons | Custom SVG icons (Next.js, Tailwind, React, etc.) | components/icons/ |
// Import the component
import Btn01 from "@/components/irisui/button/btn-01";
// Use in your app
<Btn01
onClick={() => console.log("Button clicked!")}
className="custom-class" // Optional: Override styles
>
Submit Form
</Btn01>// Import the AI Chat component
import AiChat from "@/components/irisui/blocks/ai-chat/ai-chat";
// Render in your page
<AiChat />- Features:
- Multimodal input (text, voice, file uploads).
- Quick actions (search, summarize, translate).
- Animated UI with Framer Motion.
- Customization:
- Extend
MultimodalInputto add more actions. - Modify
quickActionsarray to change default options.
- Extend
- Features:
- Generate portraits with customizable settings (style, background, lighting).
- Preview and download generated images.
- Loading animations and progress indicators.
- Customization:
- Update
settingsinform-generation.tsxto add more options. - Modify
Previewcomponent to change the preview UI.
- Update
- Auto-generated TOC: Table of contents for all docs.
- Search: Built-in search via
/api/search. - Live Previews: Interactive component previews.
- Add MDX Files:
- Place
.mdxfiles incontent/docs/. - Use frontmatter for metadata:
--- title: "Button Components" description: "A guide to using Iris UI buttons." ---
- Place
- Reference Components:
import { Btn01 } from "@/components/irisui/button/btn-01"; <Btn01>Example Button</Btn01>
pnpm buildDocs are auto-generated in /docs.
- Push to GitHub/GitLab.
- Import into Vercel.
- Deploy with zero config (optimized for Next.js).
pnpm build
pnpm startOutputs to .next/.
- Create a Component File:
// components/irisui/button/btn-16.tsx export default function Btn16() { return <button>New Button</button>; }
- Add to Registry:
Update
registry/registry-components.tsto include the new component.
Use the cn() utility to merge classes:
import { cn } from "@/lib/utils";
<div className={cn("bg-red-500", "hover:bg-red-600")} />Modify globals.css to add new themes or override defaults:
:root {
--custom-color: oklch(0.7 0.1 120);
}
.dark {
--custom-color: oklch(0.3 0.1 120);
}- Fork the Repository.
- Create a Feature Branch:
git checkout -b feat/your-feature
- Commit Changes:
git commit -m "Add your feature" - Push to Branch:
git push origin feat/your-feature
- Open a Pull Request.
- ESLint: Follows
next/core-web-vitals. - Prettier: Enforced via
postcss.config.mjs. - TypeScript: Strict typing (
"strict": true).
- Visual Testing: Ensure components render correctly in both light/dark modes.
- Interactive Testing: Test animations and interactions.
MIT License Copyright (c) 2025 Mansarah