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

@awc-ui/react

v1.0.1

Published

Typed React 18+ components for accessible Material Design 3 Web Components, with Next.js SSR, server rendering, and tree-shaking

Downloads

737

Readme

React Web Components and Next.js SSR — @awc-ui/react

Typed React 18+ components for AWC UI — accessible Material Design 3 Web Components with a dedicated Next.js and React SSR entry.

Install

npm install @awc-ui/react @awc-ui/core

Requires React 18+.

Usage

import { MdButton } from "@awc-ui/react";

export function Demo() {
  return <MdButton variant="filled">Click me</MdButton>;
}

The components register their underlying custom elements automatically on first render.

For conditionally mounted dialogs, sheets and menus, use the exported useOverlay hook. It opens the Core component and keeps it mounted until its native exit animation finishes, including StrictMode replay and cancellation before the first open completes.

Server rendering

For styled markup on first paint (Next.js App Router and other SSR setups), import the same components from the server entry — they render each component's Declarative Shadow DOM on the server and hydrate on the client:

import { MdButton } from "@awc-ui/react/server";

Smaller bundles

Tree-shaking works out of the box: importing a component ships only that component plus the shared runtime. Two opt-ins shrink things further.

Client-only build — if your app never server-renders, alias the core components to the CSR build, which compiles out the Declarative-Shadow-DOM hydration support (≈3 kB gz):

// vite.config.ts
resolve: {
  alias: [
    { find: '@awc-ui/core/dist/components', replacement: '@awc-ui/core/dist/components-csr' },
  ],
},

Remove the alias if you adopt SSR — the hydrating build is the default for a reason.

Preact — the wrappers are preact/compat-safe. Since the components are web components, React only provides thin glue, and swapping it for Preact saves ≈50 kB gz with three aliases (most specific first; react/jsx-runtime maps automatically):

// vite.config.ts — and `npm i preact` (keep react + @types for type-checking)
resolve: {
  alias: [
    { find: 'react-dom/client', replacement: 'preact/compat/client' },
    { find: 'react-dom', replacement: 'preact/compat' },
    { find: 'react', replacement: 'preact/compat' },
  ],
},

Caveats: no React DevTools/concurrent features, and libraries that touch React internals may misbehave — evaluate for your app.

Documentation

React and Next.js SSR guide · All component docs

Component manuals and AI-readable documentation also ship with @awc-ui/core.