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.3

Published

React UI component library used by Port

Downloads

317

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.

Requirements

  • Node.js 22+
  • React 19+, React DOM 19+
  • Vite 7+ with @vitejs/plugin-react and vite-plugin-svgr (see peerDependencies in package.json)
  • @port-labs/anchor-icons as a peer dependency (publish or link that package in your environment if you use icon-driven components)
  • Tailwind CSS 4.x — only if you integrate using the JIT path below (tailwindcss is an optional peer if you use the pre-built CSS bundle instead)

Install

npm install @port-labs/anchor-ui

Install matching peer dependency versions for your app.

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.

Vite + CommonJS entry

The published JS is CommonJS. In Vite, pre-bundle the package in dev, dedupe @headlessui/react, and widen build.commonjsOptions.include for production if you see missing named exports or duplicate Headless UI context—see the Port frontend app.

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.