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

@nipe-solutions/react-anchored-layer

v0.1.0-alpha.0

Published

Anchored floating layers for React.

Readme

React Anchored Layer

Anchored floating layers for React.

This repository is under active development toward 0.1.0-alpha.0.

React Anchored Layer renders arbitrary content through a portal and keeps it aligned with an anchor through scrolling, resizing, and layout changes. It does not provide dropdown, combobox, menu, tooltip, dismissal, or focus semantics.

Positioning is powered by Floating UI. React Anchored Layer adds a focused React composition model, portal behavior, and project-level defaults around that positioning engine.

Installation

npm install @nipe-solutions/react-anchored-layer

React and React DOM are peer dependencies. React 18.3 and React 19 are supported.

Quick start

import { AnchoredLayer } from '@nipe-solutions/react-anchored-layer'
import '@nipe-solutions/react-anchored-layer/core.css'

;<AnchoredLayer.Root open={open} onOpenChange={setOpen}>
  <AnchoredLayer.Anchor asChild>
    <input aria-controls="address-results" aria-expanded={open} />
  </AnchoredLayer.Anchor>
  <AnchoredLayer.Content
    id="address-results"
    placement="bottom-start"
    offset={6}
    matchAnchorWidth
  >
    {results}
  </AnchoredLayer.Content>
</AnchoredLayer.Root>

Content portals to document.body by default. Wrap it in AnchoredLayer.Portal to select a custom container, or provide a scoped default with AnchoredLayer.Provider.

The core stylesheet contains positioning mechanics only. theme.css is an optional visual starting point, and styles.css combines both.

Responsibility

The package owns positioning, portal placement, measurement, collision handling, and first-position visibility. Applications own open intent, outside-press and Escape behavior, focus, keyboard selection, request state, and ARIA semantics.

Content exposes data-state, data-side, data-align, data-positioned, and the following CSS variables:

  • --anchored-layer-anchor-width
  • --anchored-layer-anchor-height
  • --anchored-layer-available-width
  • --anchored-layer-available-height
  • --anchored-layer-transform-origin

Module import and server rendering are safe without DOM globals. Portal content is established on the client after mounting.

Compatibility and size

The package targets current Chromium, Firefox, and WebKit, with automated Playwright coverage in all three engines. The published JavaScript is measured with React, React DOM, and Floating UI external: the current build is about 2.2 kB gzip for ESM and 1.8 kB gzip for CommonJS. The packed prerelease artifact is about 7.4 kB.

Known initial limitations are deliberate: there are no virtual anchors, arrow, raw middleware API, automatic offscreen dismissal, vertical-writing-mode claim, or global stacking coordinator.

Development

Use Node 24 and npm 11.

npm install
npm run check

License

MIT