Skip to content

shadcn.io is not affiliated with official shadcn/ui

Shadcn Client Only for React Radix UI

Render content only on the client side.

Framework
UI library

Installation

bunx --bun shadcn@latest add https://kit.dev/r/radix/client-only.json

Usage

import { ClientOnly } from "@/components/ui/client-only";
<ClientOnly>
  <div className="rounded-xl border bg-muted px-4 py-3 text-foreground text-sm">
    This content is only rendered on the client side.
  </div>
</ClientOnly>

Demos

Fallback

API Reference

ClientOnly

PropType