@kushagradhawan/kookie-ui
v0.1.86
Published
A modern React component library with beautiful design tokens, flexible theming, and comprehensive docs
Maintainers
Readme
@kushagradhawan/kookie-ui
A modern React component library with beautiful design tokens, flexible theming, and comprehensive documentation.
Installation
npm install @kushagradhawan/kookie-ui
# or
pnpm add @kushagradhawan/kookie-ui
# or
yarn add @kushagradhawan/kookie-uiQuick Start
import '@kushagradhawan/kookie-ui/styles.css';
import { Theme, Button, Card, Flex, Text } from '@kushagradhawan/kookie-ui';
export default function App() {
return (
<Theme accentColor="blue" grayColor="gray">
<Card size="3" variant="soft">
<Flex direction="column" gap="3" p="4">
<Text size="3">Welcome to Kookie UI</Text>
<Button size="3" variant="solid">
Get Started
</Button>
</Flex>
</Card>
</Theme>
);
}What is Kookie UI?
Kookie UI is a fork of Radix Themes that extends it into a full design system. While Radix provided excellent building blocks, Kookie UI codifies the patterns and rules that make interfaces feel consistent and systematic.
Key Features
- Systematic Design Tokens - 12-point progressions for spacing, radius, and shadows with predictable steps
- Universal Material System - Every component understands translucency vs. solidity with theme-level defaults and per-component overrides
- Consistent Sizing - Cards, buttons, dropdowns, selects, and avatars all follow the same scale
- Unified Motion - Transition patterns work consistently across all components
- Enhanced Accessibility - Native tooltip support, stricter aria-label enforcement, and improved keyboard navigation
- Layout Patterns - Shells, sidebars, panels, and toolbars that work together predictably
Framework Support
Next.js (App Router)
// app/layout.tsx
import '@kushagradhawan/kookie-ui/styles.css';
import { Theme } from '@kushagradhawan/kookie-ui';
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<Theme accentColor="blue" grayColor="gray">
{children}
</Theme>
</body>
</html>
);
}Next.js (Pages Router)
// pages/_app.tsx
import '@kushagradhawan/kookie-ui/styles.css';
import { Theme } from '@kushagradhawan/kookie-ui';
import type { AppProps } from 'next/app';
export default function App({ Component, pageProps }: AppProps) {
return (
<Theme accentColor="blue" grayColor="gray">
<Component {...pageProps} />
</Theme>
);
}Vite + React
// main.tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import '@kushagradhawan/kookie-ui/styles.css';
import { Theme } from '@kushagradhawan/kookie-ui';
import App from './App';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<Theme accentColor="blue" grayColor="gray">
<App />
</Theme>
</React.StrictMode>,
);Create React App
// src/index.tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import '@kushagradhawan/kookie-ui/styles.css';
import { Theme } from '@kushagradhawan/kookie-ui';
import App from './App';
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
<React.StrictMode>
<Theme accentColor="blue" grayColor="gray">
<App />
</Theme>
</React.StrictMode>,
);Remix
// app/root.tsx
import { Links, Meta, Outlet, Scripts } from '@remix-run/react';
import { LinksFunction } from '@remix-run/node';
import { Theme } from '@kushagradhawan/kookie-ui';
import styles from '@kushagradhawan/kookie-ui/styles.css';
export const links: LinksFunction = () => [{ rel: 'stylesheet', href: styles }];
export default function App() {
return (
<html>
<head>
<Meta />
<Links />
</head>
<body>
<Theme accentColor="blue" grayColor="gray">
<Outlet />
</Theme>
<Scripts />
</body>
</html>
);
}Gatsby
// gatsby-browser.js
import '@kushagradhawan/kookie-ui/styles.css';// src/pages/_app.tsx
import { Theme } from '@kushagradhawan/kookie-ui';
export const wrapRootElement = ({ element }) => (
<Theme accentColor="blue" grayColor="gray">
{element}
</Theme>
);CSS Imports
Complete Stylesheet
import '@kushagradhawan/kookie-ui/styles.css';Modular Imports
import '@kushagradhawan/kookie-ui/tokens.css'; // Design tokens
import '@kushagradhawan/kookie-ui/components.css'; // Component styles
import '@kushagradhawan/kookie-ui/utilities.css'; // Utility classes
import '@kushagradhawan/kookie-ui/layout.css'; // Layout utilitiesRequirements
- React 16.8+ through React 19
- Node.js 16+ (for development)
- TypeScript support built-in
{
"peerDependencies": {
"react": "16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
}
}Components
Layout
Shell- Main application shell with header, sidebar, and content areasSidebar- Collapsible sidebar navigationFlex- Flexible container with gap supportGrid- CSS Grid containerContainer- Responsive container with max-widthSection- Semantic section wrapper
Navigation
Tabs- Tab navigation componentSegmentedControl- Segmented control for mutually exclusive optionsTabNav- Tab navigation for page-level navigation
Data Entry
Button- Primary action buttonIconButton- Icon-only buttonToggleButton- Toggle state buttonToggleIconButton- Toggle state icon buttonTextField- Text input fieldTextArea- Multi-line text inputSelect- Dropdown selectionCheckbox- Checkbox inputCheckboxGroup- Group of checkboxesCheckboxCards- Card-based checkbox selectionRadio- Radio button inputRadioGroup- Group of radio buttonsRadioCards- Card-based radio selectionSwitch- Toggle switchSlider- Range slider inputProgress- Progress indicator
Data Display
Card- Content card containerAvatar- User avatar imageBadge- Status badgeImage- Responsive image componentTable- Data tableDataList- List of data itemsSkeleton- Loading skeleton placeholder
Feedback
AlertDialog- Modal alert dialogDialog- Modal dialogSheet- Slide-out panelPopover- Floating content panelHoverCard- Hover-triggered cardTooltip- Contextual tooltipCallout- Callout messageSpinner- Loading spinner
Overlays
DropdownMenu- Dropdown menuContextMenu- Right-click context menuSelect- Dropdown selection
Typography
Text- Text component with semantic stylingHeading- Heading componentCode- Inline codeKbd- Keyboard key displayBlockquote- Block quoteQuote- Inline quoteEm- EmphasisStrong- Strong emphasis
Layout Utilities
AspectRatio- Maintain aspect ratioInset- Inset spacingSeparator- Visual separatorScrollArea- Custom scrollable area
Theming
Kookie UI uses a comprehensive theming system with:
- Accent Colors - Primary brand colors (blue, green, orange, etc.)
- Gray Colors - Neutral color scales (gray, mauve, slate, etc.)
- Material System - Translucent vs. solid surfaces
- Size Scales - Consistent sizing across components
- Spacing System - 12-point spacing progression
- Typography - Font scales and weights
- Dark Mode - Automatic dark mode support
Status
⚠️ Beta - Kookie UI is in beta. Components and APIs are still evolving, and breaking changes may happen. Check changelogs carefully before upgrading.
Note: This package uses npm Trusted Publishing with OIDC for secure CI/CD deployments.
License
MIT © Kushagra Dhawan
