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

@ldlework/feedback

v0.1.0

Published

Drop-in, drag-and-drop feedback overlay for React — sticky notes and arrows pinned to your live page, saved to a file.

Readme

💬 feedback

Drag-and-drop feedback, right on your live React page.

Reviewers drop sticky notes onto the running app, draw arrows at exactly what they mean, and send it all back as one JSON file. A built-in review mode steps through every note.

npm license types react

Live demo · Docs · npm


@ldlework/feedback is a drop-in annotation overlay for React. Mount one provider and one component and a dock appears in the corner: drag a note onto the page, type what you're flagging, and draw an arrow at any element on the page. Notes save to localStorage as you go and export to a single file — arrows carry a CSS path to their target so a developer can find it without the picture.

  • 🎯 Drag to annotate — drop notes anywhere, draw arrows from a note's edge straight at what you mean.
  • 📐 Pinned to content — positions are stored in content coordinates, so notes stay glued to your layout across every window size.
  • 🧱 Inner scroll panes — wrap a pane's content in a region so notes scroll and clip with it, not just the window.
  • 🧭 Review mode — step through every note; it routes to the right page and section and scrolls it into view.
  • 🎨 Themeable — one stylesheet, every colour a CSS variable; re-skin it all from a single --fb-hue.
  • 💾 Save to a file — export/import one JSON document; nothing leaves the browser unless you send it.
  • 📮 Submit to a server — point submit at an endpoint (or hand it a function) and the dock grows a send button.
  • 🪶 Zero runtime dependencies — ships ESM + types, router-agnostic, no CSS framework required.

Install

pnpm add @ldlework/feedback
# npm i @ldlework/feedback  ·  yarn add @ldlework/feedback

react and react-dom (v18 or v19) are peer dependencies. Import the stylesheet once, anywhere in your app:

import '@ldlework/feedback/styles.css'

Quick start

Wrap your tree in FeedbackProvider and mount FeedbackLayer once inside it. On a page that scrolls the window, that's the entire integration.

import { FeedbackProvider, FeedbackLayer } from '@ldlework/feedback'
import '@ldlework/feedback/styles.css'

export function App() {
  return (
    <FeedbackProvider>
      <YourApp />
      <FeedbackLayer />
    </FeedbackProvider>
  )
}

Inner scroll & sections

When your content scrolls inside a panel rather than the window, wrap that content in a <FeedbackRegion> — inside whatever scroll container you already have. Notes then live in the region: they ride along with the scroll and clip with the pane.

import { FeedbackRegion } from '@ldlework/feedback'

function DocumentPane() {
  return (
    <div style={{ overflow: 'auto', height: '100vh' }}>
      <FeedbackRegion anchorX="left">
        {/* content */}
      </FeedbackRegion>
    </div>
  )
}

A section is an optional sub-scope of a page — notes tagged with one only show while that section is active, so a carousel step or tab doesn't leak its notes onto its siblings. Provide onReveal so review can switch to a section before it scrolls to a note:

<FeedbackRegion section={currentStepId} onReveal={(stepId) => goToStep(stepId)}>
  {steps[currentStepId]}
</FeedbackRegion>

Submitting to a server

By default feedback leaves the browser only as a downloaded file. Give the provider a submit target and the dock adds a send button that delivers the document over the network instead — the button reports sending, sent, and failure states, and file export stays available alongside it.

An endpoint URL is the whole integration — the document is POSTed there as JSON with a submittedAt timestamp:

<FeedbackProvider submit="https://api.example.com/feedback">

Need auth headers or a different method? Build the submitter with endpointSubmitter:

import { endpointSubmitter } from '@ldlework/feedback'

<FeedbackProvider
  submit={endpointSubmitter('https://api.example.com/feedback', {
    headers: { Authorization: `Bearer ${token}` },
    credentials: 'include',
  })}
>

Or supply any (doc: FeedbackDoc) => Promise<void> for full control — an SDK call, a queue, whatever. Throw (or reject) to signal failure; the dock shows the error state and the reviewer can retry.

The coordinate model

A note remembers where it belongs in the content, not on the screen. Its y is measured from the top of the content; its x is measured from an anchor line chosen by anchorX:

  • left — x from the content's left edge (absolute).
  • center (default) — x signed from the horizontal centre line, so a note dropped on a centred column stays glued to it as the window narrows.
  • right — x from the content's right edge.

Because positions are stored this way, they survive a resize the way the content itself does. A region is the element those coordinates live in — the document/viewport by default, or the content you wrapped in a <FeedbackRegion>.

Router integration

Review mode walks notes across pages. With no configuration it reads location.pathname and navigates through the History API. If you use a router, hand it an adapter:

import { useMemo } from 'react'
import { FeedbackProvider, type FeedbackNavigation } from '@ldlework/feedback'
import { useLocation, useNavigate } from 'react-router-dom'

function Providers({ children }: { children: React.ReactNode }) {
  const { pathname } = useLocation()
  const navigate = useNavigate()
  const navigation = useMemo<FeedbackNavigation>(
    () => ({ page: pathname, navigate: (to) => navigate(to) }),
    [pathname, navigate],
  )
  return <FeedbackProvider navigation={navigation}>{children}</FeedbackProvider>
}

Theming

Every class is fb- prefixed and every colour is a --fb-* custom property scoped to .fb-root, so nothing leaks in or out. Re-skin the whole overlay from one knob:

/* Shift the accent and the chrome together to a cool blue. */
.fb-root { --fb-hue: 220; }

Or override individual tokens:

.fb-root {
  --fb-accent: #7c5cff;
  --fb-accent-contrast: #ffffff;
  --fb-surface-overlay: #1b1b2b;
  --fb-radius: 10px;
}

You can also scope a theme to one provider — className and style are applied to every portal root, including the ones the overlay teleports to.

Key tokens: --fb-hue, --fb-accent, --fb-accent-hover, --fb-accent-contrast, --fb-surface, --fb-surface-raised, --fb-surface-overlay, --fb-surface-sunken, --fb-border, --fb-border-strong, --fb-text, --fb-text-secondary, --fb-text-muted, --fb-success, --fb-danger, --fb-radius, --fb-shadow, --fb-font.

API

<FeedbackProvider>

| Prop | Type | Default — description | | --- | --- | --- | | storageKey | string | "feedback" — localStorage key the document is saved under. | | fileName | string | "feedback.json" — suggested name for exported files. | | navigation | FeedbackNavigation | History-API adapter — { page, navigate } for router integration. | | submit | string \| FeedbackSubmitter | Unset — an endpoint URL (document POSTed as JSON) or a custom async submitter; adds a send button to the dock. | | defaultAnchorX | AnchorX | "center" — x anchoring for pages that mount no region. | | className | string | Extra class on every portal root — e.g. a theme scope. | | style | CSSProperties | CSS-variable overrides applied to every portal root. |

<FeedbackRegion>

| Prop | Type | Description | | --- | --- | --- | | anchorX | 'left' \| 'center' \| 'right' | How x is anchored within this region. | | section | string \| null | A sub-scope so notes on one view don't leak onto siblings. | | onReveal | (section: string) => void | How review reveals a section before scrolling to a note. | | className, style | | Applied to the wrapper element (position is reserved). |

Also exported

FeedbackLayer (the overlay, no props) · types FeedbackProviderProps, FeedbackRegionProps, FeedbackNavigation, FeedbackSubmitter, EndpointOptions, AnchorX, Region, FeedbackNote, FeedbackEdge, FeedbackDoc, EdgeTarget, Port · helpers endpointSubmitter(url, options), normalizeDoc(json), and EMPTY_DOC for reading an untrusted file back into a document.

File format

Export writes one JSON file — an exportedAt timestamp plus the notes and edges. Each arrow carries a target (a CSS path and a text excerpt of the element it points at):

{
  "exportedAt": "2026-07-08T12:00:00.000Z",
  "notes": [
    { "id": "…", "page": "/pricing", "section": null,
      "x": -120, "y": 480, "text": "This CTA is unclear", "resolved": false }
  ],
  "edges": [
    { "id": "…", "page": "/pricing", "section": null, "noteId": "…",
      "port": "right", "x": 40, "y": 500,
      "target": { "selector": "section.hero > button.cta", "text": "Start free" } }
  ]
}

Contributing

This is a pnpm workspace: the library at the root, the demo site in site/.

pnpm install
pnpm build                      # build the library (tsup → dist/)
pnpm --filter feedback-site dev # run the demo + docs site

The site builds the library straight from source, so there's no build-then-run dance during development.

License

MIT © Dustin Lacewell