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

@marwes-ui/react

v0.0.4

Published

React adapter for Marwes core recipes.

Downloads

15

Readme

@marwes-ui/react

React adapter for Marwes core recipes.

Responsibilities

  • Provide React components and provider APIs.
  • Resolve theme from context and call core recipes.
  • Apply typed RenderKit output to React elements.

Non-Responsibilities

  • No component logic duplication from core.
  • No preset CSS ownership.

Install

pnpm add @marwes-ui/core @marwes-ui/react @marwes-ui/presets

Quick Start

import { MarwesProvider, Button, ButtonVariant, Input, Checkbox } from "@marwes-ui/react";
import { firstEdition } from "@marwes-ui/presets";
import "@marwes-ui/presets/firstEdition/styles.css";

export function App() {
  return (
    <MarwesProvider preset={firstEdition} theme={{ color: { primary: "#5B8CFF" } }}>
      <Button variant={ButtonVariant.primary}>Save</Button>
      <Input placeholder="Email" onValueChange={(v) => console.log(v)} />
      <Checkbox ariaLabel="Subscribe" />
    </MarwesProvider>
  );
}

Button Philosophy

Marwes buttons follow a semantic-first approach:

Recommended: Semantic Components

import { CancelButton, SubmitButton, CreateButton, DangerButton } from "@marwes-ui/react";

// These auto-set AI-friendly action metadata
<CancelButton onClick={handleCancel}>Cancel</CancelButton>
<SubmitButton>Save</SubmitButton>
<CreateButton onClick={handleCreate}>New Item</CreateButton>
<DangerButton onClick={handleDelete}>Delete</DangerButton>

Advanced: Raw Props with Type-Safe Enums

import { Button, ButtonVariant, ButtonSize, ButtonAction } from "@marwes-ui/react";

// For dynamic or custom scenarios
<Button
  variant={ButtonVariant.primary}
  size={ButtonSize.md}
  action={ButtonAction.submit}
>
  Submit
</Button>

Semantic components are preferred for guaranteed AI context and consistent UX.

Current Exports

Provider and hooks:

  • MarwesProvider
  • useTheme
  • useSystem

Atoms:

  • Button, PrimaryButton, SecondaryButton, TextButton
  • CancelButton, SubmitButton, CreateButton, DangerButton, LinkButton
  • Input
  • Icon
  • Checkbox
  • H1, H2, H3
  • Paragraph

Enums (const objects):

  • ButtonVariant - primary, secondary, text
  • ButtonSize - xs, sm, md, lg
  • ButtonAction - submit, cancel, create, delete, navigate, edit, reset, button

Molecules:

  • CheckboxField

Utilities:

  • useRenderKitDebug

Adapter Rules

  • Treat @marwes-ui/core as source of truth for behavior and a11y.
  • Apply RenderKit fields explicitly.
  • Keep component wrappers thin and predictable.
  • Do not hardcode Figma design values in adapters.

Package Structure

  • src/provider/* - provider + hooks
  • src/components/* - React wrappers around core recipes
  • src/index.ts - public exports

Figma Mapping

If design changes originate in Figma, align token/state mapping with:

  • ../../docs/FIGMA_TO_MARWES.md

Most Figma changes should land in core theme/recipes and presets CSS first, then flow into React automatically.

Scripts

  • pnpm --filter @marwes-ui/react dev
  • pnpm --filter @marwes-ui/react build
  • pnpm --filter @marwes-ui/react typecheck

Package Structure

dist/              # Build output (npm published files)
├── index.js       # ESM bundle
├── index.d.ts     # TypeScript declarations
└── index.js.map   # Source maps

src/               # Source files (not published)
├── components/    # React components
├── hooks/         # React hooks
└── provider/      # Context provider

tsconfig.json      # TypeScript config (noEmit: true)
tsup.config.ts     # Build configuration

Important: The dist/ folder is generated by pnpm build and should never be edited directly. Only the dist/ folder is published to npm (configured in package.json files field).

Related Docs

  • ../../docs/PROJECT.md
  • ../../docs/ARCHITECTURE.md
  • ../../docs/ENGINEERING.md