Framework-agnostic by design
Use it in vanilla apps or framework stacks without rewriting your data-loading architecture.
A framework-agnostic enhancer that patches fetch/xhr, stabilizes loading UX with timing controls, and exposes typed lifecycle hooks.
npm install @kerothebosa/ui-skeleton-netSkeletonEnhancer with your selector and timing config.start() once your app initializes.import { SkeletonEnhancer } from "@kerothebosa/ui-skeleton-net";
import "@kerothebosa/ui-skeleton-net/styles.css";
const enhancer = new SkeletonEnhancer({
skeletonSelector: "#content",
showDelayMs: 120,
minVisibleMs: 180,
requestTimeoutMs: 10_000,
timeoutMode: "abort",
enabledInterceptors: ["fetch", "xhr"]
});
enhancer.start();| Option | Type | Why you might tune it |
|---|---|---|
showDelayMs | number | Avoid showing skeletons for very fast responses. |
minVisibleMs | number | Prevent flicker by keeping shown skeletons visible long enough. |
requestTimeoutMs | number | Define timeout threshold for request lifecycle handling. |
timeoutMode | "abort" | "synthetic" | Choose transport abort or UI-only timeout behavior. |
enabledInterceptors | Array<"fetch" | "xhr"> | Enable only the network transports you need. |
skeletonVisuals | object | Configure mode, animation, theme, and adaptive behavior. |