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

@lessly/ui

v0.7.2

Published

Lessly design system — shared UI primitives, tokens, and theme

Readme

@lessly/ui

The live Lessly design system — shared UI primitives, design tokens, theme, and Tailwind preset. This package is the shared singleton the Lessly workspace Module Federation host provides to federation extension remotes at runtime, and it is published to the public npm registry (npmjs.com).

Contract: the package name (@lessly/ui), its exports (., ./tailwind-preset, ./styles.css), and its peer dependencies (React 19, react-router 7, optional tailwindcss >=3.4) are a cross-project contract. Do not change them without coordinating the workspace host and every federation remote.

What's inside

  • Components: shadcn/radix primitives themed by Lessly tokens (Button, Dialog, Select, Tabs, …) plus layout: Grid / Col (the adaptive 4 / 8 / 12 column grid) and GridOverlay (a design-aid overlay). The full catalog lives in Storybook at ui.lessly.com.
  • Theme: useTheme hook + ThemeToggle (toggles the light class on <html>; :root is dark, .light is light).
  • Tokens: the tailwind-preset re-exports the token vocabulary from @lessly/tokens (generated upstream in lessly-hub/design-system) with darkMode: 'class' added, and styles.css bundles the package's theme.css (CSS variables, .light overrides, typography classes) plus this library's fonts and base layer. Token values are never edited here — they change by bumping @lessly/tokens.

Install

Published to the public npm registry — no scope or registry configuration needed:

npm install @lessly/ui

Usage

import { Button, useTheme } from '@lessly/ui';
import '@lessly/ui/styles.css';

Your app's Tailwind config must use the preset so token utilities resolve. The preset needs Tailwind CSS >= 3.4 (declared as an optional peer dependency — only required if you consume the preset):

import { lesslyPreset } from '@lessly/ui/tailwind-preset';
export default {
  presets: [lesslyPreset],
  // Scan the library too — its components (Grid, Col, …) use literal token
  // utilities (`md:col-span-5`, `gap-gutter`) that Tailwind must see to generate.
  content: ['./src/**/*.{ts,tsx}', './node_modules/@lessly/ui/dist/**/*.js'],
};

CSS variables use the upstream unprefixed names (--bg-primary, --text-primary, …). The old --color-* names still resolve through a deprecated alias layer in styles.css and will be removed in the next major — migrate any direct var(--color-*) reads.

Storybook

pnpm storybook          # dev server on http://localhost:6006
pnpm build-storybook    # static build → storybook-static/

The Storybook toolbar has a global Dark/Light toggle driven by the package's own useTheme hook.

Deployment (ui.lessly.com)

The Storybook is deployed via the Lessly static-service pipeline, which runs pnpm build-storybook and serves the resulting storybook-static/. The npm package build is pnpm build (tsup → dist/), which the release flow uses; the npm package published to npmjs always contains the package, never the Storybook site.

Scripts

| Script | Description | | --- | --- | | pnpm build | tsup package build → dist/ (+ assembles styles.css from the @lessly/tokens theme, deprecated --color-* aliases, ui-local pieces, and the animation layer) — the npm package published to npmjs | | pnpm build-storybook | Storybook static site → storybook-static/ — what the static-service pipeline deploys to ui.lessly.com | | pnpm storybook | Storybook dev server on http://localhost:6006 | | pnpm test | Vitest | | pnpm type-check | tsc --noEmit | | pnpm lint | ESLint | | pnpm changeset / pnpm release:version | Versioning via Changesets (describe change → apply bump + changelog) — see RELEASING.md | | pnpm release:publish | CI-only publish wrapper (publish to npmjs if needed + changeset tag) — used by .github/workflows/version.yml |

Releasing

Add a changeset (pnpm changeset) to each significant PR; merging the auto-generated "Release: version packages" PR publishes to the public npm registry and tags v<version>. See RELEASING.md.