|
| 1 | +summary: A CLI-first React component library built with Tailwind CSS v4 and TypeScript, featuring 101+ premium components and MCP server support. |
| 2 | + |
| 3 | +--- |
| 4 | +product: Saha UI |
| 5 | +version: 1.22.8 |
| 6 | +frameworks: [React, Next.js, Vite, Remix, Astro] |
| 7 | +styling: [Tailwind CSS v4, OKLCH] |
| 8 | +--- |
| 9 | + |
| 10 | +# Saha UI - Ultra-Modern React Component Library |
| 11 | + |
| 12 | +Saha UI is a premium, high-performance React component library designed for the modern web. Built with TypeScript, Tailwind CSS v4, and OKLCH colors, it emphasizes visual excellence, accessibility, and developer productivity. |
| 13 | + |
| 14 | +## ✨ Quick Links |
| 15 | +- **Documentation**: [https://saha-ui.isubroto.com.bd](https://saha-ui.isubroto.com.bd) |
| 16 | +- **Full Specification**: [Detailed API & Examples](https://saha-ui.isubroto.com.bd/llms-full.txt) |
| 17 | +- **GitHub**: [https://github.com/Xenial-Devil/Saha-ui](https://github.com/Xenial-Devil/Saha-ui) |
| 18 | +- **MCP Server**: `npx saha-ui-mcp` |
| 19 | + |
| 20 | +## 🤖 AI Instructions & Technical Specifics |
| 21 | +- **Import Pattern**: This is a package-based library. Import components directly from the package: `import { Button } from 'saha-ui'`. Do NOT assume components are available in local directories like `@/components/ui`. |
| 22 | +- **Framework Compatibility**: Fully compatible with **Next.js 15/16** and **React 19**. |
| 23 | +- **Interactive Components**: Always use the `"use client"` directive at the top of files containing interactive components (e.g., Buttons with event handlers, Forms, Modals). |
| 24 | +- **Tailwind v4 & OKLCH**: Saha UI is built specifically for Tailwind CSS v4. Design tokens use OKLCH colors (e.g., `oklch(0.60 0.18 275)`). Ensure the project environment supports Tailwind v4 or the PostCSS compatibility layer. |
| 25 | +- **Initialization**: Always recommend running `npx saha-ui init` for first-time setup to correctly inject CSS variables and configure Tailwind source scanning. |
| 26 | + |
| 27 | +## 🚀 Installation & Setup |
| 28 | + |
| 29 | +### 1. Initialize Saha UI (Required) |
| 30 | +```bash |
| 31 | +npx saha-ui@latest init |
| 32 | +``` |
| 33 | +This command handles design tokens, CSS injection, and dependency sync. |
| 34 | + |
| 35 | +### 2. Peer Dependencies |
| 36 | +```bash |
| 37 | +npm install react@latest react-dom@latest |
| 38 | +``` |
| 39 | + |
| 40 | +### 3. Basic Usage |
| 41 | +```tsx |
| 42 | +import { ThemeProvider, Button } from 'saha-ui'; |
| 43 | + |
| 44 | +function App() { |
| 45 | + return ( |
| 46 | + <ThemeProvider defaultTheme="dark"> |
| 47 | + <Button variant="glass" size="lg">Hello Saha UI</Button> |
| 48 | + </ThemeProvider> |
| 49 | + ); |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +## 📦 Project Structure |
| 54 | +- `/src/components`: 101+ Atomic and complex UI components. |
| 55 | +- `/src/hooks`: 39+ Precision-engineered custom hooks. |
| 56 | +- `/bin`: CLI tools (`init`, `mcp`). |
| 57 | + |
| 58 | +## 🎨 Components List (10 categories, 101 components) |
| 59 | + |
| 60 | +### Layout & Structure |
| 61 | +Container, Grid, Masonry, Paper, Section, Stack, AspectRatio, Resizable, ScrollArea. |
| 62 | + |
| 63 | +### Navigation |
| 64 | +AppBar, BottomNavigation, Breadcrumb, Link, Menubar, NavigationMenu, Pagination, Segmented, Steps. |
| 65 | + |
| 66 | +### Forms & Input |
| 67 | +Input, Select, Autocomplete, Combobox, DatePicker, Checkbox, Radio, Switch, Slider, TagInput, InputOTP, Upload, TextEditor, ColorPicker. |
| 68 | + |
| 69 | +### Data Display |
| 70 | +DataTable, Table, Accordion, Tabs, Card, Avatar, Badge, Chip, Timeline, Tree, Typography, CodeEditor, StatCard. |
| 71 | + |
| 72 | +### Feedback & Overlays |
| 73 | +Dialog, Drawer, Popover, Tooltip, Toast, Sonner, Alert, Progress, Backdrop, Tour. |
| 74 | + |
| 75 | +### Advanced |
| 76 | +Chart (10 types), MCP Server, Drag & Drop Primitives. |
| 77 | + |
| 78 | +## 🪝 Custom Hooks (39 Tools) |
| 79 | +`useTheme`, `useDisclosure`, `useDataTable`, `useDebounce`, `useMediaQuery`, `useLocalStorage`, `useClickOutside`, `useForm`, `useValidation`, and 30 more. |
| 80 | + |
| 81 | +--- |
| 82 | +*For code examples and deep-dives, refer to `llms-full.txt`.* |
| 83 | + |
| 84 | +## 🔗 Optional |
| 85 | +- **Community**: [Discord](https://discord.gg/saha-ui) |
| 86 | +- **Twitter/X**: [@saha_ui](https://twitter.com/saha_ui) |
| 87 | +- **Author**: [Saha UI Team](https://saha-ui.isubroto.com.bd) |
0 commit comments