Zinc
Slate
Violet
Rose
Emerald
Blue
Orange
Star
ESC
Components (51)
AccordionTier 2: Micro-EnhancerAI Prompt BoxTier 2: Micro-EnhancerAlertTier 0: Pure HTMLAvatarTier 0: Pure HTMLBadgeTier 0: Pure HTMLButtonTier 0: Pure HTMLCalendarTier 2: Micro-EnhancerCardTier 0: Pure HTMLCheckbox & RadioTier 0: Pure HTMLColor PickerTier 2: Micro-EnhancerComboboxTier 2: Micro-EnhancerCommand PaletteTier 2: Micro-EnhancerContext MenuTier 2: Micro-EnhancerVirtualized Data GridTier 2: Micro-EnhancerData TableTier 2: Micro-EnhancerDate PickerTier 2: Micro-EnhancerDate Range PickerTier 2: Micro-EnhancerDialogTier 2: Micro-EnhancerDropdown MenuTier 2: Micro-EnhancerFile Upload & DropzoneTier 2: Micro-EnhancerInput & FieldTier 0: Pure HTMLNavigation MenuTier 2: Micro-EnhancerOTP / PIN InputTier 2: Micro-EnhancerPopoverTier 2: Micro-EnhancerProgressTier 0: Pure HTMLResizable Split PaneTier 2: Micro-EnhancerSegmented ControlTier 2: Micro-EnhancerSelectTier 2: Micro-EnhancerSeparatorTier 0: Pure HTMLSheet / DrawerTier 2: Micro-EnhancerSkeletonTier 0: Pure HTMLSliderTier 2: Micro-EnhancerStepper / WizardTier 2: Micro-EnhancerSwitchTier 0: Pure HTMLTableTier 0: Pure HTMLTabsTier 2: Micro-EnhancerTags InputTier 2: Micro-EnhancerToast / ToasterTier 2: Micro-EnhancerTooltipTier 2: Micro-EnhancerTree ViewTier 2: Micro-EnhancerSpinnerTier 0: Pure HTMLEmpty StateTier 0: Pure HTMLStackTier 0: Pure HTMLGridTier 0: Pure HTMLContainerTier 0: Pure HTMLSparklineTier 2: Micro-EnhancerDockTier 2: Micro-EnhancerTimelineTier 2: Micro-EnhancerAI ReasoningTier 2: Micro-EnhancerAI Tool CallTier 2: Micro-EnhancerAI Approval GateTier 2: Micro-Enhancer

Vite

Install and configure NNUI-KIT with Vite and React. Works out-of-the-box with both React 18 and React 19.

1

Create project

Create a new Vite project using the React TypeScript template:

Terminalbash
npm create vite@latest my-app -- --template react-ts
cd my-app
2

Install NNUI-KIT

Install the universal package from npm:

Terminalbash
npm install nnuikit
3

Clean up default Vite styles

⚠️ Important: Remove Vite's Default Root CenteringDefault Vite templates include a #root { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } rule inside src/App.css. This forces all text to be centered and adds 32px of unwanted padding.

Delete the contents of src/App.css or remove the file.

Update src/main.tsx to import the NNUI-KIT design tokens:

src/main.tsxtsx
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'

// 1. Import NNUI design tokens (CSS variables & cascade layers)
import 'nnuikit/tokens/theme.css'

// 2. Global app styling
import './index.css'

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
)

Set up your base canvas background and font in src/index.css:

src/index.csscss
:root {
  color-scheme: dark light;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ui-bg-canvas, #09090b);
  color: var(--ui-text-primary, #fafafa);
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
4

Add components to your app

Import and use components from nnuikit/react in your application:

src/App.tsxtsx
import { Button, Card, Input, Badge } from 'nnuikit/react'

export default function App() {
  return (
    <main style={{ minHeight: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '2rem' }}>
      <Card style={{ width: '100%', maxWidth: '420px', padding: '1.75rem', display: 'flex', flexDirection: 'column', gap: '1rem' }}>
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
          <h1 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 700 }}>Vite + NNUI-KIT</h1>
          <Badge variant="success">Active</Badge>
        </div>

        <p style={{ margin: 0, color: 'var(--ui-text-secondary, #a1a1aa)', fontSize: '0.875rem' }}>
          Platform-native Light-DOM UI primitives with zero Shadow DOM traps.
        </p>

        <Input placeholder="name@example.com" type="email" />
        
        <Button variant="primary" onClick={() => alert('Hello from NNUI-KIT!')}>
          Get Started
        </Button>
      </Card>
    </main>
  )
}
5

Run development server

Start the Vite local development server:

Terminalbash
npm run dev
← All FrameworksExplore All Components →