Client Only
Renders client-only components with hydration and fallback support.
Installation
pnpm dlx shadcn@latest add @diceui/client-onlyUsage
import { ClientOnly } from "@/components/client-only"
export default function App() {
return (
<ClientOnly fallback={<LoadingSpinner />}>
<ClientComponent />
</ClientOnly>
)
}API Reference
ClientOnly
A component that only renders its children on the client side.
Prop
Type