Skip to content

Install

One command installs every item of a registry.

Terminal window
pnpm dlx shadcn@latest add https://sg-widgets.vercel.app/r/react/sg-widgets.json
Terminal window
pnpm dlx shadcn-svelte@latest add https://sg-widgets.vercel.app/r/svelte/sg-widgets.json

A widget page names its own item, for a host that wants one widget rather than the set.

Terminal window
pnpm dlx shadcn@latest add https://sg-widgets.vercel.app/r/react/status-badge.json
Terminal window
pnpm dlx shadcn-svelte@latest add https://sg-widgets.vercel.app/r/svelte/status-badge.json

Run init first. It writes components.json, the stylesheet and lib/utils, and installs the packages those need. Every item imports lib/utils, and no item generates it.

An item names the packages its own files import, sg-widgets-core among them, and add installs them. A host installing one widget gets less than a host installing the set.

This registry ships its own command and popover for React, and its own command, select and checkbox for Svelte. A host that already has a primitive of that name is asked before it is overwritten. Accept, or pass --overwrite. A host that keeps its own command has no status part, and search-control fails to compile against it; one that keeps its own popover has no positionMethod, and the date editors fail the same way.