XiHanFun/XiHan.UI
À propos
A fast, lightweight, efficient and thoughtfully built framework-agnostic headless UI component library.
Développement web et applicatifWhat 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
Progression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +2
- in 15 days
- +2
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
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.
Explorer des projets similaires
Chargement…