Repository navigation
Expand file tree
/
Copy pathcontext7.json
More file actions
26 lines (26 loc) · 2.36 KB
/
Copy pathcontext7.json
File metadata and controls
26 lines (26 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"$schema": "https://context7.com/schema/context7.json",
"projectTitle": "React Loadly",
"description": "React Loadly gives React and Next.js apps accessible loading UI: 30+ spinners/loaders, Skeletonize (turns your real component into its skeleton), SkeletonLoader and SkeletonGroupLoader for skeleton screens, SkeletonSwitchLoader for loading/error/empty switching, and loading-state hooks. TypeScript, SSR-friendly, ARIA role=\"status\", reduced-motion support.",
"folders": [
"packages/react-loadly"
],
"excludeFolders": [
"**/node_modules",
"**/dist",
"**/tests",
"**/__tests__"
],
"rules": [
"To skeleton an existing component, wrap it: `<Skeletonize loading={isLoading}><UserCard user={data ?? placeholderUser} /></Skeletonize>`. Pass realistic placeholder data while loading; the real component renders and its text, images, icons and controls become skeleton blocks. Do not write a separate skeleton layout for a component you can wrap.",
"For skeletons of UI that does not exist yet (e.g. a page shell), use explicit `SkeletonLoader` + `SkeletonGroupLoader`. `AutoSkeletonLoader` is deprecated and will be removed in v4; do not use it.",
"`Skeletonize` props: `loading`, `animation`, `baseColor`, `highlightColor`, `speed`, `loadingLabel`, `as`. Add `data-skeleton` to an element that should also become a block.",
"Import the stylesheet once in the app root: `import \"react-loadly/styles.css\"` (or wrap the app with `<LoadlyProvider>`, which injects styles).",
"`SkeletonLoader` props: `variant` (\"text\" | \"rectangular\" | \"circular\" | \"rounded\"), `width`, `height`, `count`, `animation` (\"shimmer\" | \"wave\" | \"pulse\" | \"none\"), `borderRadius`, `baseColor`, `highlightColor`.",
"Loaders share base props: `size`, `color`, `speed`, `loading`, `aria-label`, `showText`, `loadingText`, `fullscreen`, `loaderCenter`, `className`, `style`.",
"`SkeletonSwitchLoader` props: `loading`, `error`, `empty`, `skeleton`, `errorFallback`, `emptyFallback`, `transition`.",
"Subpath imports keep bundles smaller: `react-loadly/loaders`, `react-loadly/skeleton`, `react-loadly/hooks`.",
"Components use React context and hooks, so in Next.js App Router use them from files that start with \"use client\" (or pass them as client-component fallbacks).",
"Always set a meaningful `aria-label` such as \"Loading orders\"."
]
}