diff --git a/src/components/Skeleton/Skeleton.story.vue b/src/components/Skeleton/Skeleton.story.vue new file mode 100644 index 000000000..5e9687b2a --- /dev/null +++ b/src/components/Skeleton/Skeleton.story.vue @@ -0,0 +1,169 @@ + + + + + + + + Basic Skeleton + + + + + + + + + + Different Sizes + + + + + + + + + + + Avatar Skeleton + + + + + + + + + + + Card Skeleton + + + + + + + + + + + + + + + + + + + + User Profile Skeleton + + + + + + + + + + + + + + + + List Skeleton + + + + + + + + + + + + + + Toggle Loading State + + + {{ isLoading ? 'Show Content' : 'Show Skeleton' }} + + + + + + + + + + Beautiful Landscape + + + + This is the actual content that appears when loading is complete. + + + + + + + + + Table Skeleton + + + + + + + + + + + + + + + + + + + + + + + + + Features: + + Smooth shimmer animation effect + Customizable width and height + Support for loading state toggle + Custom className for styling (rounded, etc.) + Dark mode support + Lightweight and performant + Slot support for actual content + + + + + diff --git a/src/components/Skeleton/Skeleton.vue b/src/components/Skeleton/Skeleton.vue new file mode 100644 index 000000000..fc521f45e --- /dev/null +++ b/src/components/Skeleton/Skeleton.vue @@ -0,0 +1,49 @@ + + + + + + + + + + + + diff --git a/src/components/Skeleton/index.ts b/src/components/Skeleton/index.ts new file mode 100644 index 000000000..f587ca442 --- /dev/null +++ b/src/components/Skeleton/index.ts @@ -0,0 +1,2 @@ +export { default as Skeleton } from './Skeleton.vue' +export * from './types' diff --git a/src/components/Skeleton/types.ts b/src/components/Skeleton/types.ts new file mode 100644 index 000000000..6a9b455e2 --- /dev/null +++ b/src/components/Skeleton/types.ts @@ -0,0 +1,5 @@ +export interface SkeletonProps { + loading?: boolean + width?: string | number + height?: string | number +} diff --git a/src/index.ts b/src/index.ts index c7475dbec..e808f9756 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,6 +32,7 @@ export * from './components/Popover' export * from './components/Rating' export { default as Resource } from './components/Resource.vue' export * from './components/Select' +export * from './components/Skeleton' export * from './components/Password' export * from './components/Spinner' export * from './components/Switch'
This is the actual content that appears when loading is complete.