Skeleton
Placeholder in the shape of content while it loads. Match real sizes to avoid layout shift.
import { Skeleton } from "@/components/ui/skeleton";
export default function Demo() { return ( <div className="flex items-center gap-4"> <Skeleton className="size-10 rounded-full" /> <div className="space-y-2"> <Skeleton className="h-4 w-60" /> <Skeleton className="h-4 w-44" /> </div> </div> );}<script setup lang="ts">import { Skeleton } from "@/components/ui/skeleton";</script>
<template> <div class="flex items-center gap-4"> <Skeleton class="size-10 rounded-full" /> <div class="space-y-2"> <Skeleton class="h-4 w-60" /> <Skeleton class="h-4 w-44" /> </div> </div></template><script lang="ts"> import { Skeleton } from "$lib/components/ui/skeleton";</script>
<div class="flex items-center gap-4"> <Skeleton class="size-10 rounded-full" /> <div class="space-y-2"> <Skeleton class="h-4 w-60" /> <Skeleton class="h-4 w-44" /> </div></div>Installation
Section titled “Installation”npx shadcn@latest add @edmi-ui/skeletonpnpm dlx shadcn@latest add @edmi-ui/skeletonyarn dlx shadcn@latest add @edmi-ui/skeletonbunx shadcn@latest add @edmi-ui/skeletonPick your package manager above; the choice is remembered. Add the @edmi-ui registry first, see Getting started.
Copy the code from Component source into your project and update the import paths to match your aliases.
npx shadcn-vue@latest add @edmi-ui/skeletonpnpm dlx shadcn-vue@latest add @edmi-ui/skeletonyarn dlx shadcn-vue@latest add @edmi-ui/skeletonbunx shadcn-vue@latest add @edmi-ui/skeletonPick your package manager above; the choice is remembered. Add the @edmi-ui registry first, see Getting started.
Copy the code from Component source into your project and update the import paths to match your aliases.
npx shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/skeleton.jsonpnpm dlx shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/skeleton.jsonyarn dlx shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/skeleton.jsonbunx --bun shadcn-svelte@latest add https://viandwi24.github.io/edmi-ui/r/svelte/skeleton.jsonPick your package manager above; the choice is remembered. Add the @edmi-ui registry first, see Getting started.
Copy the code from Component source into your project and update the import paths to match your aliases.
import { Skeleton } from "@/components/ui/skeleton";
<div className="flex items-center gap-4"> <Skeleton className="size-10 rounded-full" /> <div className="space-y-2"> <Skeleton className="h-4 w-60" /> <Skeleton className="h-4 w-44" /> </div></div><script setup lang="ts">import { Skeleton } from "@/components/ui/skeleton";</script>
<template> <div class="flex items-center gap-4"> <Skeleton class="size-10 rounded-full" /> <div class="space-y-2"> <Skeleton class="h-4 w-60" /> <Skeleton class="h-4 w-44" /> </div> </div></template><script lang="ts"> import { Skeleton } from "$lib/components/ui/skeleton";</script>
<div class="flex items-center gap-4"> <Skeleton class="size-10 rounded-full" /> <div class="space-y-2"> <Skeleton class="h-4 w-60" /> <Skeleton class="h-4 w-44" /> </div></div>Component source
Section titled “Component source”import { cn } from "cn";import type * as React from "react";
function Skeleton({ className, ...props }: React.ComponentProps<"div">) { return ( <div data-slot="skeleton" className={cn("animate-pulse rounded-[7px] bg-accent", className)} {...props} /> );}
export { Skeleton };<script setup lang="ts">import type { HTMLAttributes } from 'vue'import { cn } from '@/registry/edmi/lib/utils'
const props = defineProps<{ class?: HTMLAttributes['class']}>()</script>
<template> <div data-slot="skeleton" :class="cn('animate-pulse rounded-[7px] bg-accent', props.class)" > <slot /> </div></template>export { default as Skeleton } from "./Skeleton.vue";<script lang="ts"> import { cn, type WithElementRef } from "$lib/utils.js"; import type { HTMLAttributes } from "svelte/elements";
let { ref = $bindable(null), class: className, children, ...restProps }: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();</script>
<div bind:this={ref} data-slot="skeleton" class={cn( "animate-pulse rounded-[7px] bg-accent", className )} {...restProps}> {@render children?.()}</div>import Root from "./skeleton.svelte";
export { Root, // Root as Skeleton,};| Prop | Type | Default |
|---|---|---|
className |
string |
none (size it to the content it stands in for) |
✦ Edmi additions
Section titled “✦ Edmi additions”- Fill is
--accent, radius 7px; pulses withanimate-pulse.