npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dapplelight/signet-ui

v0.5.9

Published

Signet component kit — token-driven React primitives.

Readme

@dapplelight/signet-ui

63 React components (57 in components/ui, 6 in domain/) on Tailwind v4, in the shadcn style, styled only through Signet theme tokens. Swap the theme file and every component changes; no component is edited.

Part of Signet. Docs: https://signet.dapplelight.in/

Install

bun add @dapplelight/signet-ui @dapplelight/signet-tokens

src/app.css:

@import "tailwindcss";
@import "@dapplelight/signet-tokens/editorial.css";
@import "@dapplelight/signet-tokens/base.css";
/* Tailwind does not scan node_modules; the kit's class names must be seen. */
@source "../node_modules/@dapplelight/signet-ui/dist";

The @source path is relative to the CSS file: ../node_modules is right for src/app.css at the project root; adjust the ../ count if your CSS lives elsewhere (in a monorepo, point it at wherever node_modules is hoisted).

src/components/example.tsx:

import { Button, DataTable, EmptyState } from "@dapplelight/signet-ui"
// or one component at a time, to keep the module graph small:
import { Button } from "@dapplelight/signet-ui/components/button"

Peer dependencies

Installed by you, not by Signet. With bun, bun add <package>; with npm, npm i <package>; with pnpm, pnpm add <package>. Versions are the peerDependencies ranges in package.json.

Required:

| Package | Range | |---|---| | react, react-dom | >=19.0.0 | | @dapplelight/signet-tokens | ^0.3.0 \|\| ^0.4.0 | | @base-ui/react | >=1.3.0 | | @radix-ui/react-checkbox, -dropdown-menu, -popover, -tooltip | >=1.0.0 (>=2.0.0 for dropdown-menu) | | @tanstack/react-table | >=9.0.0 | | class-variance-authority | >=0.0.0 | | clsx | >=2.0.0 | | tailwind-merge | >=3.0.0 | | lucide-react | >=1.0.0 | | input-otp | >=1.4.0 | | react-day-picker | >=10.0.0 |

Optional (peerDependenciesMeta), needed only for the component named:

| Package | Range | Needed by | |---|---|---| | recharts | >=3.8.0 <4 | chart, screens/cost-dashboard, screens/subscription-charts | | @tanstack/react-hotkeys | >=0.12.0 <0.13.0 | shortcuts | | react-markdown, remark-gfm, remark-parse, unified, github-slugger | >=10.0.0, >=4.0.0, >=11.0.0, >=11.0.0, >=2.0.0 | markdown, fold | | @tiptap/react, @tiptap/pm, @tiptap/starter-kit, @tiptap/extension-mention, @tiptap/extension-link | >=3.34.0 <4 | rich-text-editor | | @autoform/react, @autoform/zod, @tanstack/react-form, zod | ^5.0.0, ^6.0.0, ^1.0.0, ^4.0.0 | schema-form |

What is in it

  • The shadcn set: button, input, dialog, drawer, popover, select, tabs, table and the rest. There is no sheet component: use drawer or responsive-sheet for sheets.
  • Extras: a virtualised data-table, combobox, stat-strip, responsive-sheet, markdown (safe by default), fold (long text behind a Show more link), emoji-picker.
  • Basics on UI SDK behaviours (see below): toast, alert-dialog, field, avatar, radio-group, command (with a ⌘K CommandDialog), timeline, stepper, sidebar, breadcrumb, spinner. toast has sonner's API (toast(), toast.success(), <Toaster position closeButton />), so the create-signet-app template's sonner Toaster can be swapped for it by changing two imports.
  • domain/ components that carry product vocabulary, such as trend-chip, kept out of the main barrel. domain/job-runs is a table of background-job runs (status, attempts, error, retry and cancel) on data-table; it takes plain rows such as signet-server's jobs.status(id) and callbacks. domain/upload is a drag-and-drop uploader with per-file progress (XHR to a presigned URL), retry, and size/type hints; getTarget and onUploaded talk to your server. domain/amount formats money: the locale's grouping (₹12,50,000 in en-IN), the currency's own decimals, minor units and bigints exactly, compact lakh/crore ("₹12.5L", "₹1.2Cr"), a sign, and tone colours from the theme's --money-* slots (falling back to the status accents), with a class per part (currency, integer, fraction…). domain/kanban is a board whose cards move between columns by pointer drag or keyboard (Space picks up, arrows move, Space drops, Escape cancels), announced in a live region; the board is a plain { column: ids[] } object.
  • Hooks, one subpath each: hooks/use-media-query, hooks/use-debounce, hooks/use-local-storage (JSON, SSR-safe, synced across tabs), hooks/use-copy (clipboard with a copied flag) and hooks/use-intersection (on screen or not, for lazy loading).
  • screens/ ready screens, out of the barrel: auth-screens (sign in / up by email or phone code, OAuth, verify, session expired), account-screens (profile, devices, API keys), notification-screens (inbox, preferences) and privacy-screens (DPDP consents, export and erasure requests). Plain data in, callbacks out, shaped like signet-server and signet-db; wire them through createRpcClient. Strings come from DEFAULT_*_LABELS and the labels prop; parts take className, composites classNames. Demo: screens-user.html in the showcase (linked from its header).
  • screens/admin-screens: AdminScreen, an admin panel generated from signet-db's defineAdmin metadata over signet-server's adminRoutes (createAdminApi({ baseUrl: "/admin" })): table list, server sort, filters, search and cursor pages, deleted rows, a record form built from the column types, create, bulk delete, row actions and the audit trail. Every part is exported (AdminPanel, AdminTable, AdminRecordSheet…) with useAdmin() for your own.
  • screens/billing-screens: BillingScreen and Paywall on signet-db entitlements and signet-payments: plan picker (web and store plans, monthly / yearly), current plan with currentPeriodEnd and source, restore purchases, usage meters, GST invoice links and a wallet balance. plansFromEntitlements(definePlans(...), display) builds the plan list.
  • screens/monetisation-screens: RemotePaywall renders the server's offering (signet-db createOfferings: copy, plans shown, highlighted plan and badge, trial text, button text, prices per store) on the Paywall parts and hands the matching product to your checkout; plansFromOffering(offering, source, display) is the plan list it uses. CustomerCenter is the self-serve page on signet-db createCustomers: plan and renewal date, cancel with the retention offer first, a store manage link instead for App Store and Google Play, refund request and contact support. CustomerTimeline is the admin view of one customer's purchases, renewals, refunds, cancellations, billing issues and grace periods across stores and web, with ledger totals.
  • screens/experiment-screens: ExperimentList and ExperimentResults, the admin readout of a signet-db experiment (exposures, conversions, rate, lift and p-value per variant against the control) with start, stop and roll out a winner, over signet-server's experimentAdminRoutes. ExperimentForm creates and edits one (key, variants with weights, a JSON value or, with offerings, an offering and version per variant, goal event, audience, start and stop). PricingExperimentResults is a pricing experiment's readout from GET /pricing/:experiment: per variant the offering, conversion with lift and p-value, trial conversion, revenue per exposed user and an LTV marked as an estimate, with one-click rollout.
  • screens/status-screens: StatusPage, the public status page from signet-db's status.summary(): overall status, a maintenance notice, components and recent incidents with their updates. StatusAdmin is the admin screen over statusAdminRoutes: the maintenance switch with message and until, component statuses, and incidents opened, updated and resolved (updates are append-only); its parts (MaintenanceForm, ComponentStatusList, IncidentForm, IncidentUpdateForm) are exported. periods across stores and web, with ledger totals. RemotePaywall shows the customer's best offer (free trial, intro or win-back, from customers.withOffers), passes it to onPurchase, and calls onImpression once per offering version for paywall conversion; PromotionalGrantForm grants a plan for some days from admin.
  • screens/funnel-screens: WebFunnel walks a web-to-app funnel from signet-server's funnel routes (questions, then RemotePaywall with the URL discount priced in, then email and code) and hands the checkout to you; ExpressCheckout mounts Stripe's Express Checkout Element (Apple Pay, Google Pay) and Payment Element with Stripe.js loaded at runtime (nothing bundled); FunnelRedemption waits for the webhook, then offers "Open the app" and the code to paste. Fetch GET /sessions/:id from the same site with credentials: "include": only the checkout's browser (HttpOnly cookie) gets the link; anyone else sees "paid, we emailed you the link".
  • screens/subscription-charts: SubscriptionCharts on signet-db createCharts: MRR per currency (and a converted total), active subscribers and trials, new versus renewal revenue and refunds, churn and trial conversions, paywall views against conversions, with filters by store, plan, country and offering, saved audiences and a CSV link. Needs recharts (optional peer), so it is its own export path.
  • screens/cost-dashboard: CostDashboard on signet-server's observabilityAdminRoutes: spend over time with cache savings, spend by model, top spenders (hashes as given) and global cap bars; give it data or a fetcher(days). Needs recharts (optional peer), so it is its own export path.
  • screens/growth-screens: WaitlistJoin (with the place in line), InviteAccept, ReferralCard, OnboardingChecklist, FeedbackWidget / FeedbackForm and WhatsNew, shaped like signet-db's growth results.
  • screens/workflow-screens: WorkflowRunTimeline (run status, who or what it is waiting on, every step with retries and decisions, cancel) and ApprovalInboxCard (approve / reject with a reason), shaped like signet-db's wf.get(id) and wf.pendingApprovals(user). Demo for these four: screens-ops.html in the showcase (?screen=, ?theme=, ?dark=1).
  • screens/org-screens: OrgSwitcher, MembersList (roles, remove, leave, pending invites), InviteDialog (one-time link with Copy), AcceptInvitePage (a page around InviteAccept) and OrgSettings (name, theme, brand colour with a buildTheme preview), shaped like signet-server's orgRoutes responses. Demo: screens-orgs.html.
  • screens/collab-screens: CommentThreads (threads, replies, edit with an "edited" marker, delete, a composer), MentionTextarea (type @ for a member picker; the body stores @[Name](user:<id>), so a rename never breaks a mention), ActivityFeed ("Asha changed status to Done", comments, Load more) and VersionHistory (versions, a field diff, Restore, Undo with the server's conflict message), shaped like signet-db's createCollab and signet-server's collabRoutes. Demo: screens-collab.html.
  • screens/abuse-screens: CaptchaWidget (loads Cloudflare Turnstile or hCaptcha and reports the token for signet-server's requireCaptcha; provider="test" reports the test token with no script) and AiSpendAdmin (spend against caps today and this month, top users and orgs, set and remove caps), shaped like signet-server's aiSpendAdminRoutes.
  • Real-time: hooks/use-channel and screens/realtime-screens, see Real-time. Demo: screens-realtime.html.
  • Data editing: domain/csv-import, components/data-grid and components/rich-text-editor, see Data editing.

Real-time

On signet-server's realtime hub (@dapplelight/signet-server/realtime). hooks/use-channel has createRealtimeClient (reconnects with backoff, rejoins resuming from the last event, pings on the hub's heartbeat, drops duplicate events, applies shared state by version), useChannel(client, channel, { onEvent }) (presence, shared state, set, setTyping, setEditing, and stale / conflict flags with acknowledge), usePresence and useRecordChanges. screens/realtime-screens has AvatarStack, EditingBadge, TypingIndicator (a polite live region) and RecordChangedBanner ("this record changed, reload?"); strings come from DEFAULT_REALTIME_LABELS and the labels prop.

const live = createRealtimeClient({ url: `/realtime?org=${orgId}` })
function Doc({ id, me }) {
  const ch = useChannel(live, `record:docs:${id}`)
  const { changed, change, dismiss } = useRecordChanges(live, `record:docs:${id}`, { selfId: me })
  return (<>
    <RecordChangedBanner changed={changed} by={change?.data?.name} onReload={() => { refetch(); dismiss() }} />
    <AvatarStack members={ch.members} selfId={me} />
    <EditingBadge members={ch.members} selfId={me} field="title" />
    <input onFocus={() => ch.setEditing("title")} onBlur={() => ch.setEditing(null)} onInput={() => ch.setTyping(true)} />
    <TypingIndicator members={ch.members} selfId={me} />
  </>)
}

A user removed from the org or whose session expired is not reconnected (close codes 4003 and 4001); anything else reconnects with backoff.

Data editing

Three pieces for editing data in a product, all on theme tokens, with DEFAULT_*_LABELS + labels for every string, className plus classNames per part, data-slot and state attributes on every part, and copy-in with signet add data-grid, signet add rich-text-editor or signet add csv-import.

  • domain/csv-import: CsvImport takes a file or pasted text, parses it (RFC 4180: quoted fields, "", line breaks inside quotes, CRLF, a BOM; the separator is detected), matches columns to fields by name, key or alias, validates every row with your zod schema (or anything with safeParse), shows errors per cell with a "rows with errors" filter and a download of them, and passes the valid rows to onImport. Return signet-db's bulkInsert report and its errors land on the right line and field. parseCsv, toCsv, autoMatch and validateRows are exported for your own flow.
  • components/data-grid: DataGrid is an editable grid on the same react-table core and Table parts as DataTable: text, number, select, date and checkbox cells; one tab stop with arrows, Home/End, PageUp/PageDown, Ctrl+arrows, Enter or F2 or typing to edit, Enter/Tab to save and move, Escape to cancel; Shift+arrows select a range, Ctrl+C copies it as TSV, Ctrl+V pastes a TSV block (or fills the range with one value), Delete clears it; Shift+Space or the checkbox column selects rows; header sort and keyboard column resize; rows are virtualised (10k+). onChange gets every edit, paste and clear as a batch; the grid shows the new values at once, and a throw (or returned failures) puts them back with the error on each cell (aria-invalid, data-error) and in a live region. It is a role="grid" with aria-rowcount, aria-rowindex, aria-colindex, aria-selected and aria-sort.
  • components/rich-text-editor: RichTextEditor is built on Tiptap v3 (optional peers: bun add @tiptap/react @tiptap/pm @tiptap/starter-kit @tiptap/extension-mention @tiptap/extension-link; like chart, it is not in the barrel, so apps without Tiptap are unaffected). Bold, italic, inline code, links, two heading levels, bulleted and numbered lists (Mod+B/I/E/K), a WAI-ARIA toolbar, and @ mentions through Tiptap's suggestion API with onMentionSearch, the same people search MentionTextarea uses. The value is markdown written by walking the editor's HTML through an allowlist, and pasted HTML goes through the same allowlist, so pasted scripts, handlers, styles and javascript: links never reach it; mentions are stored as @[Name](user:<id>), so signet-db's createCollab parses and notifies them as it does for comments. RichTextContent and richTextToHtml render stored markdown as HTML that is safe by construction. On the server, pass bodies through signet-server's sanitizeMarkdown.
const schema = z.object({ name: z.string().min(1), email: z.email(), plan: z.enum(["free", "pro"]) })
<CsvImport
  fields={[{ key: "name", required: true }, { key: "email", aliases: ["E-mail"] }, { key: "plan" }]}
  schema={schema}
  onImport={(rows) => api.post("/customers/import", { rows })} // returns bulkInsert's report
/>

<DataGrid
  aria-label="Customers"
  rows={rows}
  getRowId={(r) => r.id}
  selectable
  columns={[
    { id: "name", header: "Name" },
    { id: "seats", header: "Seats", type: "number" },
    { id: "plan", header: "Plan", type: "select", options: [{ value: "free", label: "Free" }, { value: "pro", label: "Pro" }] },
    { id: "renews", header: "Renews", type: "date" },
    { id: "active", header: "Active", type: "checkbox" },
  ]}
  onChange={async (changes) => {
    await api.patch("/customers", { changes }) // a throw reverts and marks the cells
    setRows((all) => applyChanges(all, changes))
  }}
/>

<RichTextEditor aria-label="Note" value={body} onValueChange={setBody} onMentionSearch={(q) => api.get(`/mentions?q=${q}`)} />
<RichTextContent value={body} />

Demo: data-edit.html in the showcase.

Behaviours and recipes

The basics are built from behaviours: keyboard, focus, selection, dismissal and the ARIA they need. UI SDK (@ui-sdk/core and @ui-sdk/react, pinned to an exact beta) implements them inside this package; nothing from it appears in signet-ui's exports, so it can be replaced here without an app changing. Each component's source starts with its recipe:

| Component | Recipe | |---|---| | toast | live-region + timers + swipe + dismiss + shortcut (F6) | | alert-dialog | popup + focus-trap + dismiss | | field | field-wiring (label names, description and error describe, aria-invalid) | | avatar | image-loading | | radio-group | selection + roving-focus | | command | selection + typeahead + filter; CommandDialog adds popup + focus-trap + dismiss + shortcut + controllable-state | | timeline | roving-focus | | stepper | roving-focus + status | | sidebar | disclosure + controllable-state + shortcut; on phones the Drawer's popup + focus-trap + dismiss + swipe | | breadcrumb | landmark | | spinner | live-region | | screens/billing-screens | selection + roving-focus + controllable-state + live-region | | screens/monetisation-screens | selection + roving-focus + controllable-state + live-region | | screens/experiment-screens | selection + live-region + field-wiring | | screens/status-screens | live-region + field-wiring + roving-focus (timeline) | | screens/funnel-screens | selection + controllable-state + live-region | | screens/subscription-charts | field-wiring (labelled filters) + controllable-state (filters) | | screens/cost-dashboard | controllable-state (range) + live-region (loading, error) | | screens/growth-screens | selection + roving-focus + controllable-state + popup + dismiss + live-region + field-wiring | | screens/workflow-screens | roving-focus (timeline) + live-region + field-wiring | | screens/org-screens | popup + dismiss + live-region + field-wiring + controllable-state | | screens/collab-screens | combobox (mention picker: aria-activedescendant, arrows, Enter/Tab, Escape) + live-region | | domain/amount | money-format + tone (colour from the --money-* slots) | | domain/kanban | controllable-state + live-region + drag + keyboard-move | | screens/admin-screens | selection + controllable-state + popup + focus-trap + dismiss + roving-focus (tabs) + field-wiring |

@dapplelight/signet-ui/behaviors exports the behaviours a new component needs directly, with Signet's own types: useShortcut(keys, handler) and useShortcutLabel(keys) ("mod+k" is ⌘ on Apple platforms, Ctrl elsewhere), useControllableState({ value, defaultValue, onChange }), and matchScore(text, query), the fuzzy score Command ranks by.

Field takes a TanStack Form field's state.meta.errors as errors, the same shape @dapplelight/signet-lib/form reads. Command takes filter={false} with your own results, so a @dapplelight/signet-lib/search result list can drive it.

Customising

Every basic follows the same contract, and a new component should too:

  • Tokens only. Colours, radii and type come from theme utilities (bg-popover, text-text-muted, border-border, rounded-lg); never a hex value or a stock palette colour.
  • className on every part, merged over the defaults with cn (tailwind-merge), so a later class wins. Composite components take classNames per part (Toaster, Stepper) or a named class prop (backdropClassName, wrapperClassName, contentClassName).
  • State as data-*. Style any state from CSS: data-open, data-highlighted, data-checked, data-disabled, data-invalid, data-complete / data-current / data-upcoming, data-state.
  • All text overridable for translation: label, closeLabel, title, description, aria-label have English defaults and are props.
  • Parts are exported one by one (SidebarHeader, CommandItem…), and render swaps a part's element (render={<Button variant="destructive" />}, render={<Link to="/" />}).
  • Controlled or not. Stateful parts take open / value with onOpenChange / onValueChange, or defaultOpen / defaultValue.

Build a new component

When signet-ui has no component for a need, build it in this package from signet-ui/behaviors and theme tokens, the way sidebar and stepper are:

  1. Write its recipe first: which behaviours it needs (popup, dismiss, focus-trap, selection, roving-focus, typeahead, filter, shortcut, controllable-state, live-region). Put it as the // Recipe: line at the top of the file; signet-mcp's compose_component reads it.
  2. Reuse a signet-ui part that already has the behaviour (Drawer and Dialog for popups, Timeline for roving focus over a list, Command for filtering) before reaching for a new one. Take state and shortcuts from signet-ui/behaviors. Import @ui-sdk/* only inside this package, never in its exported types.
  3. Style with token utilities and the customising contract above.
  4. Add keyboard, focus and ARIA tests to test/basics.tsx; the tokens package test compiles every theme against the new classes. Export it in package.json and add a demo to apps/showcase. The MCP index and API.md regenerate on their own (see CONTRIBUTING.md).

The full export list is in API.md.

License

MIT