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

@port-labs/anchor-ui

v0.0.4

Published

React UI component library used by Port

Readme

@port-labs/anchor-ui

React UI primitives used by Port. This package is published to npm for adopters who want the same components outside the main Port app.

Install

npm install @port-labs/anchor-ui

Peer dependencies

Install versions compatible with your app (see package.json):

| Package | Version | Notes | | ------------------------- | --------- | ------------------------------------------------------------------------------------- | | react | ^19.2.4 | | | react-dom | ^19.2.4 | | | @headlessui/react | ^2.2.0 | Required at runtime by several components. | | @port-labs/anchor-icons | * | Required when using icons / components that pass icon props. | | tailwindcss | 4.1.11 | Optional peer — omit if you only use standalone.css (path A under Usage). |

Engines: Node.js 22+.

For Vite, ESM, and Headless UI dedupe, see Bundlers.

Usage

You must load either the pre-built stylesheet or Anchor theme CSS plus your own Tailwind pipeline. The JS entry only pulls in fonts as a side effect; it does not auto-import theme or utility CSS (so we do not double-ship styles when you choose one integration path).

import { Button, Typography } from '@port-labs/anchor-ui';

Subpath exports are listed in package.jsonexports. Only those entry points are guaranteed in the npm tarball.

A — Pre-built CSS (no Tailwind setup for this library)

At build time we compile Tailwind + Anchor theme + utilities used in this package into a single file. Import it like any static CSS (no @source, no content config for @port-labs/anchor-ui):

@import '@port-labs/anchor-ui/standalone.css';

Or in HTML, load node_modules/@port-labs/anchor-ui/dist/standalone.css.

Use this when your app does not run Tailwind for Anchor, or you want adopters to “drop in” one file. You can omit the optional tailwindcss peer if everything else still satisfies npm.

Caveat: If your app also uses Tailwind globally, avoid importing both standalone.css and a second full @import "tailwindcss" that re-applies the same preflight/layers unless you know what you are merging—prefer path B for a single Tailwind graph.

B — Tailwind in your app (smaller CSS, shared config)

Import Anchor theme tokens and register the package for class detection:

@import 'tailwindcss';
@import '@port-labs/anchor-ui/main.css';

Tailwind does not scan node_modules by default. In the same global stylesheet, add an @source path relative to that file to the installed package’s dist directory (npm does not ship src/).

There is no @source package-name shortcut—use a filesystem path, per the Tailwind v4 docs.

Examples (count ../ until you reach the directory that contains node_modules):

  • CSS at src/styles/app.css and node_modules next to package.json:

    @source "../../node_modules/@port-labs/anchor-ui/dist";
  • CSS under apps/my-app/... with dependencies hoisted to the repo root:

    @source "../../../../node_modules/@port-labs/anchor-ui/dist";

If you truly cannot scan dist, you can safelist utilities with @source inline("…"), but scanning dist is the normal approach.

Bundlers

The published JS is ESM ("type": "module", exports.import). Use import, not require.

If you mix components from this package with primitives from @headlessui/react in the same tree, pre-bundle the package in dev and dedupe @headlessui/react so there is a single Headless UI copy—see the Port vite.config (optimizeDeps.include / esbuildOptions / resolve.dedupe).

Source and issues

Source of truth and issue tracker live in the monorepo: github.com/port-labs/Port (directory packages/anchor-ui).

License

ISC — see LICENSE.