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

@aphrody/m3-primitives

v3.3.4

Published

Material Design 3 React primitives: the SpaceUI (@spacedrive/primitives) component set rebuilt on the M3 roles, shape, typescale, state layers and motion of the aphrody design system.

Readme

@aphrody/m3-primitives

Material Design 3 React primitives. This is the SpaceUI component set (@spacedrive/primitives, MIT, © Spacedrive, vendored in packages/aphrody-spaceui) rebuilt on the aphrody M3 system: M3 color roles and state layers, the 10-step shape scale, the M3 typescale, the M3 focus ring, elevation, Material Symbols and the M3 easings of @aphrody/m3-motion. Base UI (@base-ui/react) is the headless layer: it owns behavior, keyboard interaction, focus management and accessibility, and drives the M3 enter / exit motion through its data-starting-style / data-ending-style attributes. Every upstream export and prop still works; the Radix-era props (asChild, checked="indeterminate", delayDuration, forceMount, onSelect, array slider values) are mapped onto Base UI, and Base UI props are accepted as well.

Fusion rules, token mapping and the Material Web equivalents of each component: docs/design/SPACEUI-M3-FUSION.md.

Install

bun add @aphrody/m3-primitives @aphrody/m3-theme @aphrody/m3-tokens

Peers: react and react-dom 18 or 19, tailwindcss 4.1+.

Styles

The components are styled with M3 Tailwind utilities (bg-surface-container, text-on-surface-variant, rounded-full, text-label-large, hover:bg-on-surface/8), so the app compiles them with Tailwind v4:

@import "tailwindcss";
@import "@aphrody/m3-tokens/m3-tokens.css"; /* shape, typescale, elevation, motion, state */
@import "@aphrody/m3-theme/spaceui.css"; /* SpaceUI themes as M3 schemes — or tokens.css */
@import "@aphrody/m3-theme/tailwind.css"; /* M3 utilities */
@source "../node_modules/@aphrody/m3-primitives/dist";

Icons use the Material Symbols font; register it once:

import { ensureMaterialSymbols } from "@aphrody/material-web/icon/material-symbols.js";
ensureMaterialSymbols();

Usage

import {
  Button,
  Card,
  CardContent,
  CardHeader,
  CardTitle,
  Icon,
  Input,
} from "@aphrody/m3-primitives";

export function Welcome() {
  return (
    <Card variant="elevated">
      <CardHeader>
        <CardTitle>Welcome</CardTitle>
      </CardHeader>
      <CardContent className="space-y-4">
        <Input placeholder="Your name" icon="person" />
        <Button variant="filled">
          <Icon name="arrow_forward" size={18} /> Get started
        </Button>
      </CardContent>
    </Card>
  );
}

Components

| Group | Components | M3 anatomy | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | Actions | Button (filled, tonal, outlined, text, elevated + the SpaceUI variants), CircleButton, CircleButtonGroup, ShinyButton, ShinyToggle, FilterButton, SelectPill, SelectTriggerButton | Common buttons, icon buttons, connected group, filter chip | | Selection | CheckBox, RadixCheckbox, Switch, Slider, RadioGroupRoot/Item, ToggleGroup, OptionList | Checkbox, switch, slider, radio, segmented button | | Text input | Input, SearchInput, PasswordInput, TextArea, Label, SearchBar, NumberStepper, Select | Outlined / filled text fields, search bar, exposed dropdown menu | | Navigation | TabsRoot/List/Trigger/Content, TabBar, SpaceItem | Primary tabs, navigation-drawer item | | Menus and overlays | Dialog (+ dialogManager, useDialog), Popover, Tooltip, Kbd, DropdownMenu, ContextMenu, Dropdown | Basic dialog, menus, plain tooltip | | Feedback | toast, Toaster, Loader, ProgressBar, CircularProgress, Banner, InfoBanner, Badge | Snackbar, progress indicators, banners, badges and assist chips | | Containment | Card (elevated, filled, outlined), Divider, Collapsible, Resizable, LayoutCard, GridLayout | Cards, divider, expansion panel | | Type | CategoryHeading, ScreenHeading, Shortcut | Title small, headline small, key chips | | Forms | Form, ErrorMessage, errorStyles, z | Error supporting text | | Helpers | Icon, renderIcon, IconSource, PHOSPHOR_TO_SYMBOL, m3StateLayer, m3FocusRing, tw, surface class names, key symbols | |

Sizes: the default (md/unset) is the M3 baseline height; smaller sizes are M3 density steps.

Coming from @spacedrive/primitives

Rename the import. Phosphor icon props still compile (they accept an IconSource: a Material Symbols name, an element or a component). Visible differences: M3 heights (inputs default to 56, icon buttons to 40), pill-shaped buttons, secondary-container selection, Material Symbols glyphs, Select opens below its field, Collapsible draws an expand_more indicator (indicator={false} to opt out).

Development

bun run typecheck
bun test          # happy-dom preloaded by bunfig.toml
bun run build     # tsup + declarations

Licence

Apache-2.0 AND MIT: aphrody changes under Apache-2.0, SpaceUI-derived code under MIT (LICENSE.spaceui).