@qingwu-ui/skeleton
v0.9.0-beta
Published
Qingwu UI Skeleton — runtime DOM-measuring auto skeleton (in-place measurement, portal overlay, compositor-driven shimmer), snapshot-to-static-HTML renderer, zero-dependency
Maintainers
Readme
@qingwu-ui/skeleton
青梧UI 的 运行时测量自动骨架屏 —— 框架无关,纯 DOM + CSS,零依赖。
- 运行时测量:挂载即按目标元素实际尺寸就地生成骨架(in-place measurement),复杂布局可选 portal 浮层覆盖
- 合成器驱动微光:shimmer 走 compositor 合成层,动画流畅且可被
prefers-reduced-motion关闭 - 快照到静态 HTML:
renderSkeletonSnapshot可将骨架渲染为静态 HTML,供 SSR 直出,避免首屏闪烁
安装
npm install @qingwu-ui/skeleton使用
import { AutoSkeleton } from "@qingwu-ui/skeleton";
const sk = new AutoSkeleton(document.getElementById("card")!, {
shape: "rounded",
});完整 API 见 青梧UI 根 README。
