New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bosh-code/preact-slot

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bosh-code/preact-slot

A Preact implementation of @radix-ui/react-slot.

latest
Source
npmnpm
Version
1.3.1
Version published
Maintainers
1
Created
Source

@bosh-code/preact-slot

Coverage Status Release Unit Test NPM Version

A Preact implementation of the @radix-ui/react-slot component meant for use with shadcn/ui component library. This component exposes the same API as the Radix UI Slot, and should be a drop-in replacement when building Preact component libraries using shadcn/ui components.

Installation

Install the package

pnpm add --save-peer @bosh-code/preact-slot

Usage

I recommend setting up a path alias for @radix-ui/react-slot to point to this package, so that no changes are made to any shadcn/ui components that you may be using in your library.

// tsconfig.json
{
  "compilerOptions": {
    // ...
    "paths": {
      "@radix-ui/react-slot": [
        "./node_modules/@bosh-code/preact-slot"
      ]
    }
  }
}

Development

  • Install dependencies:
pnpm install
  • Run the playground:
pnpm playground
  • Build the library:
pnpm build
  • Build in watch mode:
pnpm dev
  • Run the unit tests:
pnpm test

Keywords

preact

FAQs

Package last updated on 20 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts