# dandy-ui

> Lightweight UI component library based on tailwindcss v4, optimized for edge and serverless environments

Latest version **4.1.0** (published 2026-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install dandy-ui
pnpm add dandy-ui
yarn add dandy-ui
bun add dandy-ui
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2026-04-09 |
| First published | 2026-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 409 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nidhal Bettaibi |
| Maintainers | nidhal_bettaibi |
| Keywords | react, react-components, ui-library, tailwindcss, tailwind-v4, dandy-ui, component-library, design-system, accessible, wcag, mobile-first, responsive, dark-mode, theme, radix-ui, nextjs, typescript |

## Links

- npm: https://www.npmjs.com/package/dandy-ui
- Repository: https://github.com/bettaibi/dandy-docs
- Homepage: https://github.com/bettaibi/dandy-docs#readme
- Issues: https://github.com/bettaibi/dandy-docs/issues
- npm.io page: https://npm.io/package/dandy-ui

## Dependencies (2)

- [clsx](https://npm.io/package/clsx.md) 2.1.1
- [tailwind-merge](https://npm.io/package/tailwind-merge.md) 2.5.4

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 4.1.0 (latest) — 2026-04-09
- 4.0.0 — 2026-03-27
- 3.0.1 — 2026-02-11
- 3.0.0 — 2026-02-11
- 2.1.0 — 2026-02-02
- 2.0.3 — 2026-01-29
- 2.0.2 — 2026-01-29
- 2.0.1 — 2026-01-29
- 2.0.0 — 2026-01-29
- 0.1.0 — 2026-01-05

## README

# Dandy UI

A lightweight, edge-first React UI library built on **TailwindCSS v4**.  
Optimized for Cloudflare Pages, serverless, and SSR environments.

[![npm](https://img.shields.io/npm/v/dandy-ui)](https://www.npmjs.com/package/dandy-ui)
[![license](https://img.shields.io/npm/l/dandy-ui)](LICENSE)

---

## Features

- 🎨 TailwindCSS v4 - Latest Tailwind with CSS-first configuration
- 🌙 Dark Mode - Built-in dark mode support with semantic tokens
- 📱 Mobile-First - Responsive, touch-friendly design
- 🔧 TypeScript - Full TypeScript support with strict type checking
- 🚀 Next.js Ready - Compatible with Next.js 13+ App Router
- 🌳 Tree Shakable - Only import what you need
- ♿ Accessible - WCAG 2.1 AA compliant components
- 🎯 Semantic Tokens - CSS custom properties for consistent theming

---

## Quick Start

```bash
npm install dandy-ui
```

```css
@import "tailwindcss";
@import "dandy-ui/theme.css";
@import "dandy-ui/base.css";
```

```tsx
import { ThemeProvider } from "dandy-ui";

<ThemeProvider>
  <App />
</ThemeProvider>;
```

For SSR, add `<ThemeScript />` in `<head>` to prevent flash of unstyled content.

---

## Entry Points

| Entry               | Purpose                          | Example                                                 |
| ------------------- | -------------------------------- | ------------------------------------------------------- |
| `dandy-ui`          | Core components                  | `import { Button, Dialog } from "dandy-ui"`             |
| `dandy-ui/extra`    | Heavy components (optional deps) | `import { Drawer, DatePicker } from "dandy-ui/extra"`   |
| `dandy-ui/markdown` | Markdown renderer                | `import { MarkdownViewer } from "dandy-ui/markdown"`    |
| `dandy-ui/utils`    | Pure utility functions           | `import { formatDate, debounce } from "dandy-ui/utils"` |

---

## Components

**Layout** — `Container` · `Flex` · `Grid` · `Paper` · `Section` · `Table` · `ScrollShadow`

**Typography** — `Text` · `Heading` · `Hint` · `Label` · `Divider` · `Code` · `Kbd`

**Forms** — `Button` · `IconButton` · `Input` · `TextArea` · `NumberInput` · `Select` · `CheckBox` · `Radio` · `Switch` · `Slider` · `FileInput` · `Rating` · `Icon`

**Feedback** — `Alert` · `Badge` · `Chips` · `Spinner` · `Skeleton` · `ProgressBar` · `CircularProgress`

**Overlays** — `Dialog` · `Popover` · `InfoTip` · `SnackbarProvider`

**Compound** — `Accordion`

**Extra** — `Drawer` · `DatePicker` · `DateRangePicker` · `MultiDatePicker` · `MultiSelect` · `InputOTP` · `SidebarLayout` · `SideBar`

**Markdown** — `MarkdownViewer`

---

## Peer Dependencies

**Required:**

```bash
npm install react react-dom tailwindcss @radix-ui/react-tooltip
```

**Optional** (install only what you use):

| Package                                                                         | Component                                    |
| ------------------------------------------------------------------------------- | -------------------------------------------- |
| `@radix-ui/react-dialog`                                                        | Dialog                                       |
| `@radix-ui/react-popover`                                                       | Popover                                      |
| `@radix-ui/react-select`                                                        | Select                                       |
| `vaul`                                                                          | Drawer                                       |
| `react-day-picker`                                                              | DatePicker, DateRangePicker, MultiDatePicker  |
| `input-otp`                                                                     | InputOTP                                     |
| `react-markdown` `rehype-highlight` `rehype-raw` `rehype-sanitize` `remark-gfm` | MarkdownViewer                               |

---

## Theme System

CSS custom properties defined in `theme.css`. Never hardcode colors.

**Tokens:** `primary` · `secondary` · `accent` · `background` · `foreground` · `muted` · `border` · `card` · `popover` · `success` · `warning` · `error` · `info`  
Each has a `-foreground` variant. Dark mode activates via the `dark` class.

```tsx
<div className="bg-primary text-primary-foreground" />
```

---

## License

MIT © [Nidhal Bettaibi](https://github.com/bettaibi)

---
_Source: https://npm.io/package/dandy-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
