@react-slot
Hooks/utilities · data updated 2026-07-28
react-slot brings Vue-style named slots to React for fine-grained component composition. The registry provides a single Slot.tsx component with Slottable, SlotPlaceholder, Template, and useSlots primitives, enabling parent components to inject content into named slots defined in child templates. No styling dependencies — pure React utility. Very small footprint. Free and open-source (MIT). Use for: building compound components or layout primitives that need Vue-like named slot composition when Radix UI's asChild pattern is insufficient for your composition needs.
Install
npx shadcn@latest add https://react-slot.vercel.app/r/registry.jsonHealth
Components (1)
Preview
Live sandbox previews render component source client-side. Where a component can’t be rendered standalone, sh4dcn falls back to its source and install command.