
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
skeleton-ui-generator
Advanced tools
A lightweight library to generate skeleton loaders for tables and UI components
A lightweight, customizable library for generating skeleton loaders for tables, cards, lists, forms, galleries, and custom UI components. Perfect for creating smooth loading experiences in web applications.
npm install skeleton-ui-generator
import { createTableSkeleton, createCardSkeleton } from 'skeleton-ui-generator';
// Create a table skeleton
const tableSkeleton = createTableSkeleton({
rows: 8,
columns: 5,
showHeader: true
});
// Append to DOM
document.getElementById('table-container').appendChild(tableSkeleton);
// Create a card skeleton
const cardSkeleton = createCardSkeleton({
lines: 4,
width: '300px'
});
document.getElementById('card-container').appendChild(cardSkeleton);
import { createTableSkeleton } from 'skeleton-ui-generator';
const tableSkeleton = createTableSkeleton({
rows: 10,
columns: 6,
showHeader: true,
headerHeight: '60px',
rowHeight: '45px',
columnWidths: ['20%', '30%', '15%', '15%', '10%', '10%'],
baseColor: '#f0f0f0',
highlightColor: '#ffffff'
});
import { createCardSkeleton } from 'skeleton-ui-generator';
const cardSkeleton = createCardSkeleton({
lines: 5,
width: '400px',
padding: '24px',
baseColor: '#e3f2fd',
highlightColor: '#ffffff',
borderRadius: '12px'
});
import { createListSkeleton } from 'skeleton-ui-generator';
const listSkeleton = createListSkeleton({
items: 8,
showAvatar: true,
avatarSize: '60px'
});
import { createFormSkeleton } from 'skeleton-ui-generator';
const formSkeleton = createFormSkeleton({
fields: 6
});
import { createGallerySkeleton } from 'skeleton-ui-generator';
const gallerySkeleton = createGallerySkeleton({
items: 12,
columns: 4
});
import { createCustomSkeleton } from 'skeleton-ui-generator';
const customSkeleton = createCustomSkeleton({
width: '200px',
height: '100px',
baseColor: '#fef3c7',
highlightColor: '#ffffff'
});
import React, { useEffect, useRef } from 'react';
import { createTableSkeleton } from 'skeleton-ui-generator';
function DataTable({ loading, data }) {
const skeletonRef = useRef(null);
useEffect(() => {
if (loading && skeletonRef.current) {
skeletonRef.current.innerHTML = '';
const skeleton = createTableSkeleton({
rows: 8,
columns: 5,
showHeader: true
});
skeletonRef.current.appendChild(skeleton);
}
}, [loading]);
if (loading) {
return <div ref={skeletonRef}></div>;
}
return (
<table>
{/* Your actual table content */}
</table>
);
}
<template>
<div>
<div v-if="loading" ref="skeletonContainer"></div>
<div v-else>
<!-- Your actual content -->
</div>
</div>
</template>
<script>
import { createCardSkeleton } from 'skeleton-ui-generator';
export default {
props: ['loading'],
mounted() {
this.updateSkeleton();
},
watch: {
loading() {
this.updateSkeleton();
}
},
methods: {
updateSkeleton() {
if (this.loading && this.$refs.skeletonContainer) {
this.$refs.skeletonContainer.innerHTML = '';
const skeleton = createCardSkeleton({
lines: 4,
width: '100%'
});
this.$refs.skeletonContainer.appendChild(skeleton);
}
}
}
}
</script>
import { SkeletonGenerator } from 'skeleton-ui-generator';
const generator = new SkeletonGenerator();
// Generate multiple skeletons with consistent styling
const config = {
baseColor: '#e3f2fd',
highlightColor: '#ffffff',
animationDuration: '2s',
borderRadius: '8px'
};
const tableSkeleton = generator.generateTableSkeleton({
...config,
rows: 8,
columns: 5
});
const cardSkeleton = generator.generateCardSkeleton({
...config,
lines: 4
});
const listSkeleton = generator.generateListSkeleton({
...config,
items: 6
});
baseColor?: string
- Base color of the skeleton (default: '#e2e8f0')highlightColor?: string
- Highlight color for animation (default: '#f1f5f9')animationDuration?: string
- Animation duration (default: '1.5s')borderRadius?: string
- Border radius (default: '4px')className?: string
- CSS class name (default: 'skeleton')rows?: number
- Number of rows (default: 5)columns?: number
- Number of columns (default: 4)showHeader?: boolean
- Show header row (default: true)headerHeight?: string
- Header row height (default: '48px')rowHeight?: string
- Data row height (default: '40px')columnWidths?: string[]
- Array of column widths (default: [])cellPadding?: string
- Cell padding (default: '12px')width?: string
- Card width (default: '100%')height?: string
- Card height (default: 'auto')lines?: number
- Number of text lines (default: 3)lineHeight?: string
- Height of each line (default: '20px')spacing?: string
- Spacing between lines (default: '12px')padding?: string
- Card padding (default: '20px')items?: number
- Number of list items (default: 5)showAvatar?: boolean
- Show avatar circles (default: true)avatarSize?: string
- Size of avatar (default: '48px')spacing?: string
- Spacing between items (default: '16px')width?: string
- Width of skeleton (default: '100%')height?: string
- Height of skeleton (default: '20px')generateTableSkeleton(config?: TableSkeletonConfig): HTMLElement
generateCardSkeleton(config?: CardSkeletonConfig): HTMLElement
generateListSkeleton(config?: ListSkeletonConfig): HTMLElement
generateCustomSkeleton(config: CustomSkeletonConfig): HTMLElement
generateFormSkeleton(config?: { fields?: number } & SkeletonConfig): HTMLElement
generateGallerySkeleton(config?: { items?: number; columns?: number } & SkeletonConfig): HTMLElement
createTableSkeleton(config?: TableSkeletonConfig): HTMLElement
createCardSkeleton(config?: CardSkeletonConfig): HTMLElement
createListSkeleton(config?: ListSkeletonConfig): HTMLElement
createCustomSkeleton(config: CustomSkeletonConfig): HTMLElement
createFormSkeleton(config?: { fields?: number } & SkeletonConfig): HTMLElement
createGallerySkeleton(config?: { items?: number; columns?: number } & SkeletonConfig): HTMLElement
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)MIT License - see the LICENSE file for details.
cat > LICENSE << 'EOF' MIT License
Copyright (c) 2025 Skeleton UI Generator
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. EOF
FAQs
A lightweight library to generate skeleton loaders for tables and UI components
We found that skeleton-ui-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.