Skip to Content

Own a Component's Source

Copy a signet-ui component into your app, edit it freely, and merge upstream changes later.

Install the shared dependencies

npm i @dapplelight/signet-tokens clsx tailwind-merge

Copy the component

bun path/to/signet/packages/cli/src/index.ts add dialog

It copies dialog and what it imports into src/components/signet/. The CLI is not on npm yet: path/to/signet is your clone, see Run from source.

Import your copy

src/web/confirm.tsx
import { Dialog } from "@/components/signet/components/ui/dialog"

Check the config

signet.json
{
  "dir": "src/components/signet",
  "alias": "@/components/signet",
  "items": { "dialog": { "version": "0.2.2", "hash": "…" } }
}

Commit signet.json and .signet/: upgrades merge against them.

Upgrade later

bun path/to/signet/packages/cli/src/index.ts diff dialog
bun path/to/signet/packages/cli/src/index.ts upgrade --dry-run
bun path/to/signet/packages/cli/src/index.ts upgrade dialog

Where you and signet-ui changed the same lines, the file keeps git conflict markers. Resolve them, then run lint, typecheck and tests.

Next