eglador-ui-react

中文文档
1.0.0-alpha.21发布于 2026/11/03MITTypeScriptESM + CJS零依赖

Eglador UI for React — headless, accessible component library. Compound subcomponents, Tailwind v4, zero runtime dependencies.

原始使用文档
文档目录10 节
  1. Installation
  2. Setup
  3. Conventions
  4. Z-index hierarchy
  5. Components (65/65)
  6. Compatibility
  7. Development
  8. Publishing
  9. Author
  10. License
eglador-ui-react

eglador-ui-react

npm version npm downloads license zero runtime deps tailwind v4 react 19 typescript

Eglador UI for React — headless, accessible component library. Compound subcomponents, Tailwind CSS v4, zero runtime dependencies.

Status: Alpha — 65/65 components shipped.

Installation

npm install eglador-ui-react

Peer dependencies: react ^19 · react-dom ^19 · tailwindcss ^4

Setup

/* app/globals.css */
@import "tailwindcss";
@source "../node_modules/eglador-ui-react";
FrameworkCSS file locationPath
Next.js (App Router)app/globals.css../node_modules/eglador-ui-react
Next.js (src/)src/app/globals.css../../node_modules/eglador-ui-react
Vitesrc/index.css../node_modules/eglador-ui-react

Conventions

All components share the same vocabulary:

  • Variants (visual hierarchy): solid · soft · outline · ghost · link
  • Sizes: xs · sm · md · lg · xl
  • Shapes: square · rounded · pill · circle
  • Palette: zinc-only (no color schemes; theming handled separately)
  • A11y: native HTML inputs, aria-* attributes, focus-visible rings, RTL-safe Tailwind logical properties

Z-index hierarchy

Baslangic 1000+ — tuketici uygulamasinin tipik z-10 / z-20 / z-50 z-index araligindan yuksek, cakisma yok.

LayerZ-IndexComponents
Modalz-[1000]Dialog, AlertDialog, Drawer, Sidebar (mobile)
Floating popupz-[1100]Popover, Combobox, Select, MultiSelect, ColorPicker, Dropdown, ContextMenu, Menubar, HoverCard, NavigationMenu
Tooltipz-[1200]Tooltip
Notificationz-[1300]Notification

Components (65/65)

Layout & Structure (7/7) — ✓ Accordion · ✓ AspectRatio · ✓ Collapsible · ✓ Resizable · ✓ ScrollArea · ✓ Separator · ✓ Sidebar

Display (8/8) — ✓ Avatar · ✓ Badge · ✓ Card · ✓ Empty · ✓ Kbd · ✓ Skeleton · ✓ Spinner · ✓ Typography

Navigation (7/7) — ✓ Breadcrumb · ✓ Menubar · ✓ NavigationMenu · ✓ Pagination · ✓ Stepper · ✓ Tabs · ✓ TreeView

Forms (24/24) — ✓ Button · ✓ ButtonGroup · ✓ Checkbox · ✓ CheckboxGroup · ✓ ColorPicker · ✓ Combobox · ✓ Dropzone · ✓ Form · ✓ Input · ✓ InputGroup · ✓ InputOTP · ✓ InputTag · ✓ Label · ✓ MultiSelect · ✓ NativeSelect · ✓ NumberInput · ✓ Radio · ✓ RadioGroup · ✓ Select · ✓ Slider · ✓ Switch · ✓ Textarea · ✓ Toggle · ✓ ToggleGroup

Date & Time (3/3) — ✓ Calendar · ✓ DatePicker · ✓ DateTimePicker

Overlays (10/10) — ✓ Alert · ✓ AlertDialog · ✓ ContextMenu · ✓ Dialog · ✓ Drawer · ✓ Dropdown · ✓ HoverCard · ✓ Notification · ✓ Popover · ✓ Tooltip

Data (1/1) — ✓ Table

Misc (5/5) — ✓ Command · ✓ ImageCropper · ✓ Link · ✓ Progress · ✓ SpeedDial

Compatibility

Works with any React-based framework: Next.js 16+, Remix, Vite + React, Gatsby.

Components are marked "use client". Place them inside a client component or after a "use client" directive.

Development

npm install
npm run dev               # tsup watch mode
npm run build             # production build to dist/
npm run typecheck         # tsc --noEmit
npm run storybook         # Storybook dev (http://localhost:6006)
npm run build-storybook   # static Storybook export

Publishing

Publishing is automated via GitHub Actions. When a GitHub Release is created, the package is published to npm.

  1. Update version in package.json
  2. Commit and push
  3. Create a GitHub Release with a matching tag (e.g. v1.0.0)

Author

Kenan Gündoğan — https://github.com/kenangundogan

Maintained under Eglador

License

MIT

版本与发布记录

eglador-ui-react 共发布 40 个版本,首次发布于 2026/03/28;过去 12 个月发布了 40 个版本。

版本发布日期距今
1.0.0-alpha.21latest2026/11/03今天
1.0.0-alpha.202026/09/032 个月前
1.0.0-alpha.192026/05/225 个月前
1.0.0-alpha.182026/05/215 个月前
1.0.0-alpha.172026/05/215 个月前
1.0.0-alpha.162026/05/215 个月前

关于 eglador-ui-react 的常见问题

eglador-ui-react 是什么?

用于React的Eglador UI -无头,可访问的组件库。复合子组件,Tailwind v4,零运行时依赖项。

如何安装 eglador-ui-react?

在项目目录运行 npm install eglador-ui-react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.0.0)、react-dom(^19.0.0)、tailwindcss(^4.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

eglador-ui-react 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

eglador-ui-react 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

eglador-ui-react 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

eglador-ui-react 可以商用吗?

eglador-ui-react 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

eglador-ui-react 还在维护吗?

最新版本 1.0.0-alpha.21 发布于 2026/11/03(今天);至今共发布 40 个版本,其中过去 12 个月发布了 40 个;首次发布于 2026/03/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。