Swaps child content with a loading spinner without changing the element size.
Installation
Copy and paste the component source files linked at the top of this page into your project.
Usage
<script lang="ts">
import { LoadingSwap } from '$lib/components/ui/loading-swap';
</script>
<LoadingSwap isLoading>Search</LoadingSwap> Examples
Large components
Larger Component
Can be used to wrap any components