Files
frontend-svelte/src/shared/ui/Skeleton/Skeleton.svelte
T

29 lines
591 B
Svelte
Raw Normal View History

<!--
Component: Skeleton
Generic loading placeholder with shimmer animation.
-->
<script lang="ts">
2026-04-23 09:48:32 +03:00
import { cn } from '$shared/lib';
import type { HTMLAttributes } from 'svelte/elements';
interface Props extends HTMLAttributes<HTMLDivElement> {
/**
* Shimmer animation
* @default true
*/
animate?: boolean;
}
let { class: className, animate = true, ...rest }: Props = $props();
</script>
<div
2026-04-23 09:48:32 +03:00
class={cn(
'rounded-md bg-background-subtle/50 backdrop-blur-sm',
animate && 'animate-pulse',
className,
)}
{...rest}
>
</div>