XiHanFun/XiHan.UI
소개
A fast, lightweight, efficient and thoughtfully built framework-agnostic headless UI component library.
웹 및 앱 개발What you can do
- Framework-agnostic - Vue, React and Web Components share one component contract and conformance suite
- Comprehensive - General, layout, navigation, data entry and display, charts, feedback, overlays and AI chat
- No third-party dependencies - Nothing beyond the host framework at runtime
- Build-time styling - DTCG tokens produce CSS variables, skins are layered with @layer, no CSS-in-JS
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +2
- in 15 days
- +2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
One headless core, adapted to Vue, React and Web Components
Docs · Getting Started · Components · Theme Designer · Changelog
English | 简体中文
XiHan.UI is a framework-agnostic headless UI component library. State, interaction and accessibility logic live in a headless core, with only a thin adapter per framework. It is the frontend foundation of the XiHanFun open-source ecosystem.
Features
| Feature | Description |
|---|---|
| Framework-agnostic | Vue, React and Web Components share one component contract and conformance suite |
| Comprehensive | General, layout, navigation, data entry and display, charts, feedback, overlays and AI chat |
| No third-party dependencies | Nothing beyond the host framework at runtime |
| Build-time styling | DTCG tokens produce CSS variables, skins are layered with @layer, no CSS-in-JS |
| Theming | Independent switches for eight environment axes, including mode, brand, density, contrast and writing direction |
| Accessibility | Keyboard interaction follows the W3C APG, scanned in real Chromium |
| Localization | Ten built-in language packs |
| AI integration | @xihan-ui/cli serves component APIs, docs and tokens as an offline knowledge base over MCP |
Getting Started
pnpm add @xihan-ui/vue @xihan-ui/tokens @xihan-ui/styles
<script setup lang="ts">
import '@xihan-ui/tokens/tokens.css'
import '@xihan-ui/styles'
import { XhDialogCloseTrigger, XhDialogContent, XhDialogRoot, XhDialogTitle, XhDialogTrigger } from '@xihan-ui/vue'
</script>
<template>
<XhDialogRoot>
<XhDialogTrigger>Open dialog</XhDialogTrigger>
<XhDialogContent>
<XhDialogTitle>Confirm</XhDialogTitle>
<XhDialogCloseTrigger>Close</XhDialogCloseTrigger>
</XhDialogContent>
</XhDialogRoot>
</template>
| Adapter | Package | Usage |
|---|---|---|
| Vue | @xihan-ui/vue |
<XhDialogRoot> |
| React | @xihan-ui/react |
<XhDialogRoot> |
| Web Components | @xihan-ui/web-components |
<xh-dialog> |
The theme runtime and the other adapters are covered in the quickstart. The styling baseline is Chrome 111, Firefox 113 and Safari 16.2.
Packages
| Layer | Packages (@xihan-ui/) |
|---|---|
| Adapters | vue, react, web-components |
| Core | core, headless, motion, pointer, position, viz |
| Appearance | tokens, styles, icons |
| Features | code-highlight, markdown, chat-stream, animations, backgrounds, sound, expression, xlsx |
| Designers | designer-kit, designer-shell |
| Tooling | cli |
Package details, layout and development commands are in the engineering notes.
Quality
- Consistency: the three adapters run a shared suite against one
connect()and compare normalized DOM. - Accessibility: keyboard interaction follows the W3C APG, with
axe-corescans in real Chromium. - Gates: lint, type checks, dependency boundaries, structural checks, tests, builds and size, with the same commands locally and in CI.
Ecosystem
| Project | Description |
|---|---|
| XiHan.Framework | A fast, lightweight, efficient, thoughtful .NET framework: microkernel, capability graph, pipeline execution |
| XiHan.BasicApp | A beautifully crafted general-purpose admin kernel built on XiHan.Framework and XiHan.UI |
Documentation
| Destination | Contents |
|---|---|
| Documentation site | Component pages with the connect API, keyboard tables and state charts |
| Design guidelines | Color, shape, motion and typography |
| Token browser | Design token lookup |
| Changelog | Release notes and upgrade advisories |
Contributing
Issues and pull requests are welcome; see the contributing guide. Community: QQ group 749791256. Support the project: sponsorship page.
Acknowledgements
| Project | Influence |
|---|---|
| Zag.js | Specification reference for component state charts and ARIA wiring |
| W3C APG | Normative basis for accessible interaction patterns |
| CommonMark | Source of Markdown semantics and conformance criteria |
| axe-core | Engine for automated accessibility scans |
License
MIT © 2021-Present XiHanFun and contributors. The XiHan.UI logo, name, interface design and original visual expression belong to the author.
관련 프로젝트 살펴보기
불러오는 중…