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

@surflane/ui

v0.23.0

Published

Surflane React components built on Base UI, with data, chart, code and Markdown components.

Readme

@surflane/ui

React 19 components for the Surflane design system, built on Base UI, with data, chart, date, tree, code highlighting and Markdown components. Browse them in the catalog.

npm install @surflane/ui @surflane/design-tokens @surflane/css @base-ui/react

@surflane/ui, @surflane/design-tokens and @surflane/css are released together with one version. Base UI is a peer dependency, 1.9 or later, so your app and Surflane share one copy. The package is ESM-only.

Usage

Import the stylesheets once at the application root. all.css brings the tokens, the theme transition, controls, composition, document typography and component styles:

@import '@surflane/ui/all.css';

To ship only what you use, import component stylesheets instead, such as @surflane/ui/button.css and @surflane/ui/dialog.css. Each brings the tokens and the styles of what its component renders. The rules sit in surflane.* cascade layers, so your unlayered CSS overrides them. Set data-theme="light" or data-theme="dark" on <html> before the first paint and add surf-typography to <body>. With AppShell, which fills the window, also give <body> no margin and the --surf-chrome background. The install guide walks through Vite, Next.js, React Router and Astro, with or without Tailwind CSS.

import {
  Button,
  DialogContent,
  DialogRoot,
  DialogTitle,
  DialogTrigger,
} from '@surflane/ui'

export function Example() {
  return (
    <DialogRoot>
      <DialogTrigger render={<Button variant='primary' />}>Open</DialogTrigger>
      <DialogContent>
        <DialogTitle>Surflane</DialogTitle>
      </DialogContent>
    </DialogRoot>
  )
}

Compound components are available both as namespaces (Dialog.Root) and as flat names (DialogRoot). Use flat names in React Server Components, which cannot dot into client exports. Every component also has its own entry point, named after its page in the catalog, such as @surflane/ui/checkbox or @surflane/ui/sheet.

Optional components

LineChart, AreaChart, BarChart, ScatterChart, DatePicker, Markdown, Tree and syntax highlighting have their own entry points, and their libraries are optional peer dependencies. Install a library only when you use its component:

| Import | Install | | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | | LineChart, AreaChart, BarChart from @surflane/ui/chart | recharts | | ScatterChart from @surflane/ui/scatter-chart | recharts | | DatePicker, DateRangePicker, TimeField, DateLocaleProvider from @surflane/ui/date-picker | react-aria-components | | Markdown from @surflane/ui/markdown | react-markdown remark-gfm | | Tree from @surflane/ui/tree | @headless-tree/core @headless-tree/react @tanstack/react-virtual | | SyntaxHighlighting from @surflane/ui/syntax-highlighting | shiki |

CodeBlock and SyntaxHighlighter render plain text until a <SyntaxHighlighting> provider wraps them. With <SyntaxHighlighting suspense>, a server render waits for the tokens and writes highlighted HTML.

Frameworks

Next.js (App Router), React Router, Astro and Vite are verified in CI with example applications. See framework integration and examples.

License

Copyright (c) 2026 ashon. Licensed under either of MIT or Apache-2.0, at your option.