Loading Swap

Previous Next

Swaps child content with a loading spinner without changing the element size.

Installation

pnpm dlx shadcn-svelte@latest add https://wds-shadcn-registry-svelte.netlify.app/registry/loading-swap.json

Usage

<script lang="ts">
	import { LoadingSwap } from '$lib/components/ui/loading-swap';
</script>
 
<LoadingSwap isLoading>Search</LoadingSwap>

Examples

Large components