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

@carrot-foundation/web-ui

v0.4.0

Published

A modern React UI component library built with Material-UI (MUI) and Next.js, designed for the Carrot Foundation web applications.

Readme

@carrot-foundation/web-ui

A modern React UI component library built with Material-UI (MUI) and Next.js, designed for the Carrot Foundation web applications.

Installation

npm install @carrot-foundation/web-ui

or

pnpm add @carrot-foundation/web-ui

or

yarn add @carrot-foundation/web-ui

Peer Dependencies

This package requires React 19.2.0 or higher as a peer dependency.

Features

  • Pre-configured Material-UI theme with custom design tokens
  • Reusable React components following atomic design principles
  • Built-in sharing functionality for social media platforms
  • Next.js optimized with client-side rendering support
  • TypeScript support
  • ESM module support

Components

Atoms

Button

A Material-UI button component with custom styling.

import { Button } from '@carrot-foundation/web-ui';

<Button variant="contained" color="primary">
  Click me
</Button>;

Icons

  • ShareIcon - Share icon component
  • CloseIcon - Close icon component
import { ShareIcon, CloseIcon } from '@carrot-foundation/web-ui';

<ShareIcon sx={{ color: 'primary.main' }} />
<CloseIcon />

Molecules

Share

A comprehensive sharing component that provides native share functionality on mobile devices and a custom dialog with social media sharing options on desktop.

import { Share } from '@carrot-foundation/web-ui';

<Share title="Check this out!" text="This is an amazing article" url="https://example.com" imageUrl="https://example.com/image.jpg" color="primary.1000" />;

Features:

  • Native Web Share API integration for mobile devices
  • Desktop-optimized dialog with social media sharing buttons
  • Support for LinkedIn, X (Twitter), Facebook, and WhatsApp
  • Instagram link integration
  • Copy-to-clipboard functionality for sharing URLs
  • Automatic device detection (mobile vs. desktop)
  • Optional image sharing on supported platforms

Props:

  • title?: string - Title for the shared content
  • text?: string - Description text for the share
  • url?: string - URL to share (defaults to current page URL)
  • imageUrl?: string - Optional image URL to include in the share (mobile only)
  • color?: string - Custom color for the share icon (default: 'primary.1000')
  • CustomIcon?: Component - Optional custom icon component to replace the default ShareIcon

Theme

ThemeProvider

Wraps your application with the custom Carrot Foundation theme.

import { ThemeProvider } from '@carrot-foundation/web-ui';

function App() {
  return <ThemeProvider>{/* Your app components */}</ThemeProvider>;
}

Theme Object

The pre-configured theme includes:

  • Custom color palette
  • Typography settings
  • Border radius configurations
  • Shadow definitions
  • Component-specific styling overrides
import { theme } from '@carrot-foundation/web-ui';

// Use the theme object directly if needed
console.log(theme.palette.primary);

Usage Example

import { ThemeProvider, Button, Share } from '@carrot-foundation/web-ui';

function MyApp() {
  return (
    <ThemeProvider>
      <div>
        <h1>My Application</h1>
        <Button variant="contained">Get Started</Button>
        <Share title="Check out my app!" url={window.location.href} />
      </div>
    </ThemeProvider>
  );
}

Dependencies

This library uses the following major dependencies:

  • @mui/material - Material-UI component library
  • @mui/lab - Material-UI lab components
  • react-share - Social media sharing components
  • react-social-icons - Social media icons
  • react-use - React hooks library
  • next - Next.js framework
  • @carrot-foundation/web-logger - Internal logging utility

Development

This package is part of the Carrot Foundation monorepo and uses:

  • TypeScript for type safety
  • SWC for fast compilation
  • ESLint for code quality
  • Nx for build orchestration

Repository

GitHub