Display a skeleton whilst another component is loading.
import { Skeleton } from "@/components/ui/skeleton-1"; export default function WrappingChildrenWithFixedSizeDemo() { return ( <div className="flex flex-col gap-4 w-3/4"> <Skeleton height={100} width="100%"> {null} </Skeleton> <Skeleton height={100} width="100%"> <button>Not hidden by Skeleton</button> </Skeleton> </div> ); }
Part of Geist — browse the full library on 21st.dev.