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

@m0-foundation/ui-library

v1.0.1

Published

M0 Foundation UI components as a Nuxt module — token/chain icons, address display, layout, and Web3 connect

Readme

@m0-foundation/ui-library

Nuxt module providing M0-specific UI components: token/chain icons, address display, layout, and Web3 connect.

Built with Tailwind CSS v4 and distributed via @nuxt/module-builder.

Installation

npm install @m0-foundation/ui-library

Setup

1. Register the module

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@m0-foundation/ui-library'],
})

2. Import the theme in your Tailwind CSS entry

The module ships M0 brand colors, fonts, and design tokens as a Tailwind v4 @theme block. Import it in your main CSS file after @import "tailwindcss":

/* app/assets/css/main.css */
@import "tailwindcss";
@import "@m0-foundation/ui-library/theme.css";

@source "../node_modules/@m0-foundation/ui-library/dist/runtime/components/";

The @source directive tells Tailwind to scan the module's components so that utility classes used inside them (like bg-grey-1000) are included in your CSS output.

3. Use components

All components are auto-imported. No manual imports needed:

<template>
  <MHeader title="My App" />

  <MIconCompoundTokenChain token="usdc" chain="ethereum" :size="32" />
  <MAddressCopy address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" />
  <MModalWeb3Connect @connect="onConnect" />

  <MFooter />
</template>

Components

Token Icons (14)

Raster icons that scale to any size. Used with MIconCompoundTokenChain or standalone.

| Component | Token | |-----------|-------| | MIconTokenUsdc | USDC | | MIconTokenUsdai | USDAi | | MIconTokenMusd | mUSD | | MIconTokenUsdPlus | USD+ | | MIconTokenUsdk | USDK | | MIconTokenUsdky | USDKY | | MIconTokenUsdhl | USDHL | | MIconTokenUsdz | USDZ | | MIconTokenMantraUsd | MANTRA USD | | MIconTokenGrid | GRID | | MIconTokenAusd | aUSD | | MIconTokenUsdsc | USDSC | | MIconTokenUsdt0 | USDT0 | | MIconTokenWmEth | wM-ETH |

Chain Icons (11)

| Component | Chain | |-----------|-------| | MIconChainEthereum | Ethereum | | MIconChainSolana | Solana | | MIconChainArbitrum | Arbitrum | | MIconChainOptimism | Optimism | | MIconChainBase | Base | | MIconChainLinea | Linea | | MIconChainHyperEvm | HyperEVM | | MIconChainBsc | BSC | | MIconChainMantra | Mantra | | MIconChainPlasma | Plasma | | MIconChainSoneium | Soneium |

Brand Icons (4)

Inline SVG icons for M0 protocol tokens. Scale to any size.

MIconTokenM, MIconTokenWM, MIconTokenPower, MIconTokenZero

Compound Icon

<MIconCompoundTokenChain token="usdc" chain="ethereum" :size="40" />

Renders a token icon with a chain badge overlay. Accepts TokenName and ChainName typed props.

Address Components

| Component | Description | |-----------|-------------| | MAddressAvatar | Colored avatar circle + shortened address | | MAddressCopy | Shortened address + copy-to-clipboard button | | MAddressDisplay | Avatar + address + optional copy + optional tag |

Layout

| Component | Description | |-----------|-------------| | MHeader | App header with M0 logo and title | | MFooter | Footer with social links and legal disclaimer |

Overlay

| Component | Description | |-----------|-------------| | MModalWeb3Connect | Wallet connect modal (MetaMask, WalletConnect, Coinbase) |

Composables

Auto-imported composables extracted from address components:

  • useShortenAddress() — returns shortenAddress(address, chars?)
  • useAvatarColor() — returns getAvatarColor(address) (deterministic HSL)
  • useCopyToClipboard() — returns { copied, copy(text) }

Types

import type { TokenName, ChainName, Wallet } from '@m0-foundation/ui-library'

Theme Tokens

The theme CSS provides Tailwind v4 design tokens:

  • Colors: grey-100 to grey-1000, green-100 to green-1000, red-100 to red-1000, accent colors, chart colors
  • Fonts: font-inter, font-ppformula, font-mono

Development

# Install dependencies
bun install

# Start playground dev server
bun run dev

# Build module for distribution
bun run build

Architecture

This is a Nuxt Module built with @nuxt/module-builder:

src/
  module.ts                     # Module definition (auto-imports components + composables)
  runtime/
    components/                 # 36 Vue SFC components
      icons/{tokens,chains,brand}/
      display/
      layout/
      overlay/
    composables/useAddress.ts   # Shared composables
    assets/css/theme.css        # Tailwind v4 @theme tokens
    assets/icons/               # PNG/SVG/WebP icon assets
    types/index.ts              # TokenName, ChainName, Wallet
playground/                     # Dev playground app

License

MIT