KO
베타 번역

@core / ui

1.0.2 ▾
인증됨MIT
GitHub

네이티브 요소 기반 React 접근성 UI: 필드, 버튼, 표, 탭, 대화상자, 알림, AA 명/암 토큰

코드파일 5개컨텍스트약 403토큰검사 통과

설치

$genpm add @core/ui

포함 내용

  • src/lib/ui/에 소스 코드, 파일 5개. (19.2kB)
  • src/lib/ui/AGENTS.md에 AI 규칙, 그리고 IDE 규칙 파일.

README

@core/ui

genpm license

Accessible base UI for React on native elements: fields, buttons, table, tabs, dialog, toasts and WCAG AA light/dark tokens

A GenPM module: source code + AI rules + MCP config, injected into your project instead of hidden in node_modules. The code lands in src/lib/ui, pinned to a verified commit, and you own it.

Install

genpm add @core/ui

No genpm yet? curl -fsSL https://genpm.net/install.sh | sh (macOS/Linux), irm https://genpm.net/install.ps1 | iex (Windows), or one-off with npx @genpm-net/cli add @core/ui.

Or let your AI agent do it: run genpm mcp setup once, then ask "add @core/ui with genpm" in Claude Code, Cursor, VS Code, Windsurf, Codex or Gemini CLI. It shows you a dry-run plan before writing anything.

What it does

Small accessible component set for React built on native elements (no UI library): Button, TextField, TextareaField, SelectField, Checkbox, Field (label + help + error wiring), DataTable (with aria-sort), Pagination, Tabs (WAI-ARIA, arrow keys), Dialog (native <dialog>), Alert, Badge, Card, Toasts, Spinner, Skeleton. Styling lives in ui.css as CSS variables (light/dark, WCAG AA contrast) and ui-* classes. Used by @core/admin, @core/blocks and the kits.

Setup

After genpm add, follow these steps (your AI agent finds the same steps in src/lib/ui/AGENTS.md and can do them for you):

  1. Import the stylesheet once in the root layout: import '@/lib/ui/ui.css' and add className="ui-root" to <body>.
  2. Use components: <TextField label="Email" type="email" required error={errors.email} />, <Button variant="primary" loading={saving}>Save</Button>.
  3. Theme: change --ui-* variables in your CSS; force a theme with <html data-theme="dark">.
  4. Verify: tab through a form; every control has a visible focus ring and a label.

What's inside

Paths are relative to src/lib/ui.

  • index.ts — all components and cx().
  • components.ts — implementation. ui.css — tokens and styles.

At a glance

  • npm dependencies (proposed, never installed without asking): react
  • AI rules: AGENTS.md, loaded by your agent only when it works in src/lib/ui

Security

GenPM installs a 40-character commit SHA (never a branch), verifies an Ed25519-signed manifest, never runs install scripts and scans AI rules for prompt injection. Details: genpm.net/docs/security.

License

MIT — see LICENSE. Browse the full catalog at genpm.net.

@core/ui 신고

패키지를 신고하려면 GitHub로 로그인하세요.