Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

base-ui基本用户界面

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

2,775

周安装

118

GitHub Stars

14

下载量

972
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:base-ui(基本用户界面)
来源仓库:https://github.com/itechmeat/llm-code
仓库路径:skills/base-ui
安装命令:
npx skills add https://github.com/itechmeat/llm-code --skill base-ui
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/itechmeat/llm-code --skill base-ui

简介

base-ui 用于辅助界面设计、视觉规范和交互体验优化,适合在 Codex、Claude、Cursor、Gemini CLI 中进行 UI 方案生成。

  • 适用于页面结构整理、视觉规范制定和组件层级优化工作。
  • 通过设计系统参考、布局建议和视觉一致性检查来改进用户界面。
  • 安装命令:npx skills add https://github.com/itechmeat/llm-code --skill base-ui
  • 建议结合现有品牌和设计系统使用,注意响应式表现和文本溢出检查

SKILL.md

Base UI (React)

Base UI provides unstyled, composable React components. This skill focuses on assembling multi-part components, composing with the render prop, and meeting accessibility requirements while you supply styling.

Quick navigation (references)

Utilities

  • references/csp-provider.md
  • references/direction-provider.md
  • references/merge-props.md
  • references/use-render.md

Forms & inputs

  • references/form.md
  • references/fieldset.md
  • references/input.md
  • references/number-field.md
  • references/otp-field.md
  • references/radio.md
  • references/select.md
  • references/slider.md
  • references/switch.md

Feedback & status

  • references/meter.md
  • references/progress.md
  • references/toast.md

Menus, navigation, overlays

  • references/drawer.md
  • references/menu.md
  • references/menubar.md
  • references/navigation-menu.md
  • references/popover.md
  • references/preview-card.md
  • references/tooltip.md

Toggles & controls

  • references/toggle.md
  • references/toggle-group.md
  • references/toolbar.md

Layout & separators

  • references/scroll-area.md
  • references/separator.md

v1.4.0 highlights

  • OTPField arrives as a preview primitive for one-time-password and verification-code entry.
  • Hidden inputs expose form and suppressHydrationWarning, which matters when controls submit to external forms or hydrate across SSR boundaries.
  • render warnings and preventBaseUIHandler() runtime behavior are more reliable in composed components.
  • Overlay/input primitives received important behavioral fixes across Drawer, NavigationMenu, Select, Slider, Toast, and Switch.

v1.3.0 highlights

  • Drawer is now stable (no longer preview) and should be treated as a first-class overlay primitive.
  • Autocomplete and Combobox add InputGroup; Combobox, Select, and Slider add Label parts.
  • Drawer adds SwipeArea for explicit swipe affordances.
  • Tooltip adds closeOnClick; Toast can close all toasts.
  • Checkbox, Radio Group, and Switch improve automatic aria-labelledby support.
  • render prop support from v1.2.0 remains relevant, including lazy elements.

Core concepts to apply

  • Unstyled primitives: all visuals come from your CSS/Tailwind/CSS Modules. Base UI handles behavior and accessibility.
  • Multi-part anatomy: most components follow Root + subparts (Trigger, Popup, Item, etc.). Assemble them explicitly.
  • render prop: replace the default element or wrap with your own component; when using the function form, merge props manually with mergeProps.
  • State-driven styling: many parts expose data attributes such as data-[popup-open], data-[highlighted], data-[pressed], data-[checked], data-[invalid], etc.
  • Portals for overlays: use Portal + Positioner + Popup for popovers, menus, tooltips, select, navigation menu content, and preview cards.

Recipes

1) Build accessible forms quickly

  • Wrap inputs with Form for submission and error aggregation.
  • Use Field.Root with a name, then Field.Label, Field.Control, and Field.Error for labels and errors.
  • Group related fields with Fieldset.Root + Fieldset.Legend.
  • For Radio groups, either use RadioGroup with aria-labelledby, or render RadioGroup via Fieldset.Root and use Field.Label for each option.
  • Ensure every form control has an accessible name (label or Field/Fieldset labeling pattern).

2) Compose with render + mergeProps

  • When passing a React element to render, Base UI merges props automatically.
  • When passing a function to render, merge Base UI props and your props with mergeProps.
  • Use event.preventBaseUIHandler() inside merged event handlers to stop Base UI’s internal behavior when needed (synthetic events only).

3) Overlays and menus (portaled UI)

  • Build popups using Root + Trigger + Portal + Positioner + Popup.
  • For menus and navigation, add Item, Separator, Arrow, and list/viewport parts as needed.
  • NavigationMenu.Link supports render for framework router links.

4) Toasts

  • Wrap the app (or a subtree) with Toast.Provider.
  • Use Toast.useToastManager() to create toasts.
  • Render a Toast.Viewport inside Toast.Portal, then map toasts to Toast.Root entries with Toast.Content, Toast.Title, Toast.Description, and Toast.Close.

5) RTL and CSP constraints

  • For RTL behavior, wrap with DirectionProvider and also set dir="rtl" (provider does not set the DOM direction).
  • For strict CSP, wrap with CSPProvider and pass nonce, or disable inline style elements if your app supplies external styles. Beware inline style attributes are not controlled by CSPProvider.

6) Sliders and ranges

  • Single value sliders: one Slider.Thumb.
  • Range sliders: pass an array and render a Slider.Thumb per value; add index for SSR alignment.
  • Adjust thumb alignment with thumbAlignment when edge alignment is required.

Critical prohibitions

  • Do not omit accessible labels for inputs, sliders, switches, or radio groups.
  • Do not expect Base UI to provide default styling; apply your own styles.
  • Do not forget Portal for overlays that need to escape stacking/overflow contexts.
  • Do not skip mergeProps when using the function form of render.

Output expectations

When responding to the user, provide:

  • The specific Base UI components to use (and their key parts).
  • A brief assembly plan (Root + parts + portal/positioner where relevant).
  • A short checklist for accessibility and state-driven styling.

Links

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.39%
按下载量换算325

Claude

31.85%
按下载量换算310

Cursor

16.69%
按下载量换算162

Gemini CLI

9.37%
按下载量换算91

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills