Skip to Content

Installation

Scaffold a new app, or add Signet to a React app you already have.

PathUse it whenStart
ScaffoldNew projectCreate your first app
Existing React appYou have Vite, React 19 and Tailwind v4Steps below

Prerequisites

NeedVersionWhy
Node.js22+Signet's CI tests 22 and 24; --target node needs 22.18+
Bun1.3+full runs its API, tests and CI under Bun, whatever installs it
React19+Peer of signet-ui
Tailwind CSS4+The themes are Tailwind v4 CSS

Add to an existing React app

Install

npm i @dapplelight/signet-ui @dapplelight/signet-tokens
npm i @dapplelight/signet-lib
npm i @base-ui/react class-variance-authority clsx
npm i tailwind-merge lucide-react

Import the theme

src/app.css
@import "tailwindcss";
@import "@dapplelight/signet-tokens/editorial.css";
@import "@dapplelight/signet-tokens/base.css";

/* Tailwind does not scan node_modules, and
   @dapplelight/signet-ui ships compiled JS whose class names
   must be seen or every component renders unstyled. The theme
   cannot declare this: a package does not know where it is
   installed. Must come after the @import rules: CSS requires
   imports first. */
@source "../node_modules/@dapplelight/signet-ui/dist";

Other themes: Themes. Your own: Make a Theme.

Add the Tailwind plugin

npm i -D tailwindcss @tailwindcss/vite
vite.config.ts
import tailwindcss from "@tailwindcss/vite"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"

export default defineConfig({ plugins: [react(), tailwindcss()] })

Wrap the app in ThemeProvider

src/main.tsx
import { ThemeProvider } from
  "@dapplelight/signet-ui/components/theme-provider"
import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
import { App } from "./App"
import "./app.css"

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <ThemeProvider>
      <App />
    </ThemeProvider>
  </StrictMode>,
)

Render a Button

src/App.tsx
import { Button } from "@dapplelight/signet-ui/components/button"

export function App() {
  return <Button>Hello Signet</Button>
}