Skip to content

Latest commit

Β 

History

63 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ninna UI v0.6.0

Full React UI library with zero runtime styling and native Tailwind CSS v4 support.

Current version: 0.6.0 β€” All @ninna-ui/* packages are at v0.6.0 on npm. Always install with @latest (e.g. pnpm add @ninna-ui/core@latest). Do NOT use 0.1.0 β€” it is an obsolete early release with a different API.

The open-source React component library that combines Chakra-level component quality with DaisyUI-simple theming - 69 accessible, production-ready components, 5 built-in theme presets, and zero JavaScript theming overhead. One CSS import. Instant design system.

License: MIT TypeScript Tailwind CSS React npm

Documentation β†’ Β· npm β†’ Β· GitHub β†’ Β· Comparison β†’


Why Ninna UI?

Most component libraries force a trade-off: great components (Chakra, Mantine) or simple theming (DaisyUI). Ninna UI eliminates that choice - you get both, with zero configuration overhead.

  • Tailwind CSS v4.1 native - Pure CSS-first configuration. No tailwind.config.ts, no PostCSS plugins, no build-step theming
  • Zero JS runtime theming - All 5 themes are pure CSS custom properties. Switch themes with a single @import - no providers, no context, no hydration cost
  • oklch color system - Perceptually uniform, high-chroma colors with automatic light/dark mode and guaranteed WCAG AA contrast
  • Radix accessibility, zero Radix API leakage - Complex components (Select, Modal, Tabs, Accordion) are powered by Radix primitives internally. Your code never imports or types against Radix
  • data-slot CSS override API - 98 named slots across all components for surgical styling without !important hacks
  • React Server Components ready - Zero 'use client' directives. Every component works in RSC, SSR, and SPA out of the box
  • TypeScript Strict with full JSDoc - Complete type safety, IntelliSense documentation on every prop, and zero any in the public API
  • Tree-shakeable modular packages - 12 independently installable packages. Import only what you use - no monolithic bundle

How Ninna UI Compares

Feature Ninna UI shadcn/ui Chakra UI Mantine DaisyUI
Tailwind CSS v4 native Yes Yes No No Yes
Zero JS runtime theming Yes Yes No No Yes
Built-in theme presets 5 0 0 0 30+
One-line theme switch Yes No No No Yes
oklch perceptual colors Yes Partial No No Yes
Radix accessibility Yes Yes No No No
data-slot CSS targeting 98 slots Yes Yes No No
Modular npm packages 12 pkgs Copy-paste 1 package 1 package 1 plugin
No 'use client' needed Yes Yes No No N/A
CLI project scaffolding 4 templates Yes No No No
React 19 support Yes Yes Yes Yes N/A
Framework agnostic Yes Yes Yes Yes Yes

In short: Ninna UI delivers the component depth and accessibility of Chakra/Mantine with the CSS-variable theming simplicity of DaisyUI - built natively on Tailwind CSS v4.

Quick Start

1. Install

pnpm add @ninna-ui/core@latest @ninna-ui/primitives@latest

2. Add a theme to your CSS (one line)

@import "tailwindcss";
@import "@ninna-ui/core/theme/presets/default.css";

3. Build your UI

import { Button } from "@ninna-ui/primitives";
import { VStack } from "@ninna-ui/layout";

export function App() {
  return (
    <VStack gap="md">
      <Button color="primary" variant="solid">
        Get Started
      </Button>
      <Button color="secondary" variant="outline">
        Learn More
      </Button>
    </VStack>
  );
}

Or scaffold a production-ready project in seconds

npx @ninna-ui/cli init my-app

Choose from Vite + React, Next.js 15, React Router v7, or Astro templates - pre-configured with your preferred theme preset, TypeScript strict mode, and all Ninna UI packages.

Packages

Component Packages

Package Components What It Does
@ninna-ui/primitives 14 Essential building blocks - Button, Badge, Avatar, Text, Heading, Link, Code, Kbd, Divider, and more
@ninna-ui/feedback 8 User feedback and status communication - Alert, Toast, Progress, Loading, Skeleton, EmptyState
@ninna-ui/forms 17 Complete form toolkit with validation - Input, Select, Checkbox, Switch, RadioGroup, Slider, FileUpload
@ninna-ui/layout 10 Responsive layout primitives - Box, Stack, Flex, Grid, Container, Center, SimpleGrid, AspectRatio
@ninna-ui/overlays 5 Accessible overlay components with focus trapping - Modal, Drawer, Popover, Tooltip, DropdownMenu
@ninna-ui/navigation 5 App navigation patterns - Tabs, Accordion, Breadcrumbs, Pagination, Stepper
@ninna-ui/data-display 7 Data visualization components - Card, Stat, Table, DataTable, Timeline, Tree, Calendar
@ninna-ui/code-block 1 Lightweight syntax-highlighted code block with copy-to-clipboard - no Prism or Shiki dependency

Infrastructure Packages

Package What It Does
@ninna-ui/core Design system foundation - TypeScript tokens, Tailwind class mappings, 5 CSS theme presets with oklch colors and automatic dark mode
@ninna-ui/cli Zero-config project scaffolding - 4 framework templates (Vite, Next.js, React Router v7, Astro) with theme selection
@ninna-ui/utils Shared utility functions - cn() class merger, composeRefs, createContext, keyboard constants, SSR helpers
@ninna-ui/react-internal Radix engine isolation layer - wraps 11 Radix primitives behind clean TypeScript interfaces so Radix never leaks to consumers

Theme Presets

Switch your entire design system with a single CSS import - no JavaScript configuration, no provider wrappers, no build step:

@import "@ninna-ui/core/theme/presets/default.css"; /* Electric Purple / Magenta */
@import "@ninna-ui/core/theme/presets/ocean.css"; /* Cool Blue / Cyan */
@import "@ninna-ui/core/theme/presets/sunset.css"; /* Warm Orange / Rose */
@import "@ninna-ui/core/theme/presets/forest.css"; /* Natural Green / Amber */
@import "@ninna-ui/core/theme/presets/minimal.css"; /* Clean Monochrome */

Every preset includes automatic dark mode via prefers-color-scheme, plus manual toggle with a .dark class. All colors use the oklch color space for perceptually uniform, vibrant palettes with guaranteed WCAG AA contrast.

Starter Templates

Production-ready project in seconds - TypeScript strict, all packages pre-installed, theme configured:

Template Framework Bundler CSS Integration
vite-react React 19 Vite 7 @tailwindcss/vite
nextjs Next.js 15 App Router Webpack/Turbopack @tailwindcss/postcss
react-router React Router v7 Vite 7 @tailwindcss/vite
astro Astro 5 + React 19 Vite 7 @tailwindcss/vite
npx @ninna-ui/cli init my-app -t nextjs --preset ocean

Development

pnpm install           # Install all dependencies
pnpm dev               # Start all dev watchers
pnpm build             # Build all 12 packages
pnpm test              # Run 700+ tests across 51 test files
pnpm lint              # Lint + typecheck all packages
pnpm --filter @ninna-ui/playground dev   # Developer sandbox at localhost:3000
pnpm --filter @ninna-ui/docs dev         # Storybook at localhost:6006

Public documentation: ninna-ui.dev - the full docs website is in the separate ninna-ui-web repository.

Project Structure

ninna-ui/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/              # Design tokens, Tailwind class maps, 5 CSS theme presets
β”‚   β”œβ”€β”€ utils/             # Shared utilities - cn(), composeRefs, createContext
β”‚   β”œβ”€β”€ react-internal/    # Radix engine isolation layer (11 engines + Slot)
β”‚   β”œβ”€β”€ primitives/        # 14 foundational components (pure React, no Radix)
β”‚   β”œβ”€β”€ feedback/          # 8 user feedback components + toast API
β”‚   β”œβ”€β”€ forms/             # 17 form components with Radix-powered accessibility
β”‚   β”œβ”€β”€ layout/            # 10 responsive layout primitives
β”‚   β”œβ”€β”€ overlays/          # 5 overlay components with focus trapping
β”‚   β”œβ”€β”€ navigation/        # 5 navigation components (2 Radix + 3 custom)
β”‚   β”œβ”€β”€ data-display/      # 7 data display components with semantic HTML
β”‚   β”œβ”€β”€ code-block/        # Lightweight syntax highlighter (regex, no Prism/Shiki)
β”‚   └── cli/               # Project scaffolding with 4 framework templates (Vite, Next.js, React Router v7, Astro)
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ playground/        # React Router v7 developer sandbox (SPA mode)
β”‚   └── docs/              # Storybook 10 - interactive component stories
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture/      # Monorepo structure, dependency graph, design patterns
β”‚   β”œβ”€β”€ guides/            # Contributing, development rules, publishing
β”‚   β”œβ”€β”€ standards/         # Accessibility, component standards, testing strategy
β”‚   └── brand/             # Product identity and competitive positioning

Documentation

License

MIT License - see LICENSE for details.

About

Full React UI library with zero runtime styling and native Tailwind support. Built for accessibility, composability, and production-scale apps.

Topics

Resources

Code of conduct

Security policy

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages