@kldhsh123/winui-vue
v0.1.1
Published
Windows 11 / WinUI 3 styled Vue 3 components — tokens extracted from microsoft-ui-xaml
Maintainers
Readme
winui-vue
A Vue component library inspired by WinUI 3 and Windows 11 design language.
This project provides web-compatible design tokens and Vue components based on the visual specifications and resources available in the microsoft-ui-xaml project.
It aims to closely reproduce the Windows 11 Fluent 2 experience while adapting platform-specific features for the web.
Component usage → USAGE.md — installation, theming, and API documentation for all 25 components with examples.
Values Windows supplies at runtime
These are referenced by the theme dictionaries but defined nowhere in the repo, because the OS provides them. src/tokens/os-colors.css holds the substitutes.
- Accent ramp (7 keys):
SystemAccentColorandLight1/2/3,Dark1/2/3. Windows derives the ramp from the user's accent colour. - Forced-colors system colours (8 keys):
SystemColorWindowColor,SystemColorWindowTextColor,SystemColorButtonFaceColor,SystemColorButtonTextColor,SystemColorHighlightColor,SystemColorHighlightTextColor,SystemColorGrayTextColor,SystemColorHotlightColor. Underforced-colors: activethese map to CSS system colour keywords (Canvas,ButtonFace,Highlight, …), which is the correct web equivalent of the HighContrast theme.
scripts/os-values.json supplies the concrete defaults and the CSS mapping; if absent, the accent ramp falls back to a single placeholder blue and the forced-colors keys to CanvasText.
Effects with no CSS equivalent
- Acrylic / Mica are compositor effects (backdrop blur + noise + luminosity blend). 45
AcrylicBrushtokens are approximated by tint colour × tint opacity; a component that wants the real look addsbackdrop-filter: blur()on top. ControlElevationBorderBrushis a 1px gradient stroke that is brighter on one edge. It becomes alinear-gradientin a 3px absolute span, applied viaborder-image.- Reveal (the old pointer-following highlight) is dead in Fluent 2; the
*Reveal*tokens are retained for completeness but map to flat fills.
Fonts
WinUI uses XamlAutoFontFamily, resolved by the OS to Segoe UI Variable. This becomes var(--winui-font-family-base), defaulting to "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif. Non-Windows users will not have it — ship a webfont or accept the fallback.
Icon glyphs are Segoe Fluent Icons code points (SymbolThemeFontFamily). 23 glyph tokens are emitted as quoted characters usable in content:. The font is not redistributable; substitute an open icon set, or Fluent UI System Icons as SVG.
