Skip to content

Loading Swap

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

Open in
pnpm dlx shadcn@latest add https://wds-shadcn-registry.netlify.app/r/loading-swap.json
import { LoadingSwap } from "@/components/ui/loading-swap"
<LoadingSwap isLoading>Search</LoadingSwap>
Open in
Larger Component
Can be used to wrap any components