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

@fulers/react-email

v1.0.0

Published

Fulers React Email package with EmailProvider, theme support, and re-exported React Email components

Readme

@fulers/react-email

Production-ready React Email package with EmailProvider, theme support, and all React Email components bundled.

Features

  • 🎨 Theme Support: Light and dark themes from Laravel config
  • 🌍 RTL/LTR Support: Automatic text direction based on locale
  • 🎯 Type-Safe: Full TypeScript support
  • 💨 Tailwind CSS: Built-in Tailwind support
  • 📦 All-in-One: Includes all React Email components
  • 🚀 Production Ready: EmailProvider handles all configuration

Installation

npm install @fulers/react-email

That's it! No need to install @react-email/components, @react-email/tailwind, or react separately.

Usage

Basic Email Template

import * as React from "react";
import {
  EmailProvider,
  Button,
  Heading,
  Text,
  Section,
} from "@fulers/react-email";
import type { BaseEmailProps } from "@fulers/react-email";

interface WelcomeEmailProps extends BaseEmailProps {
  userName: string;
}

export const WelcomeEmail = (props: WelcomeEmailProps) => {
  return (
    <EmailProvider {...props} preview="Welcome!">
      <Section className="mb-8 text-center">
        <Heading className="text-2xl font-bold text-text">
          Welcome, {props.userName}!
        </Heading>
      </Section>

      <Section className="mb-6">
        <Text className="text-base text-text">
          We're excited to have you on board.
        </Text>
      </Section>

      <Section className="text-center">
        <Button
          href={props.appUrl}
          className="rounded-md bg-primary px-6 py-3 text-white"
        >
          Get Started
        </Button>
      </Section>
    </EmailProvider>
  );
};

PHP Email Class

<?php

namespace Modules\Users\Notifications\Mail;

use Fulers\Foundation\Abstracts\Email;
use Illuminate\Contracts\Queue\ShouldQueue;

class WelcomeEmail extends Email implements ShouldQueue
{
    public function __construct(
        public User $user
    ) {
        parent::__construct();
    }

    protected function buildViewData(): array
    {
        return array_merge(parent::buildViewData(), [
            'userName' => $this->user->name,
        ]);
    }

    public function build(): self
    {
        return $this
            ->view('users::emails.welcome-email')
            ->subject('Welcome!');
    }
}

EmailProvider

The EmailProvider component wraps your email content and handles:

  • HTML structure with locale and direction
  • Tailwind configuration from Laravel theme
  • Responsive container
  • Preview text
<EmailProvider
  {...props} // Spread all BaseEmailProps
  preview="Preview text" // Optional preview text
>
  {/* Your email content */}
</EmailProvider>

Available Components

All React Email components are re-exported:

  • EmailProvider - Our custom provider (wraps everything)
  • Button - Email-safe buttons
  • Container - Centered container
  • Heading - Headings (h1-h6)
  • Text - Paragraphs
  • Hr - Horizontal rules
  • Link - Links
  • Section - Layout sections
  • Img - Images
  • Row / Column - Grid layout
  • CodeBlock / CodeInline - Code formatting
  • Markdown - Markdown support
  • Font - Custom fonts
  • And more...

See React Email docs for component details.

Tailwind Classes

All classes use theme colors from Laravel config/theme.php:

Colors

  • bg-primary, text-primary - Primary brand color
  • bg-secondary, text-secondary - Secondary color
  • bg-background - Page background
  • bg-surface - Card/container background
  • text-text - Primary text color
  • text-text-secondary - Secondary text color
  • border-border - Border color
  • bg-success, bg-warning, bg-error, bg-info - Semantic colors

Spacing

  • p-xs, m-xs through p-3xl, m-3xl

Border Radius

  • rounded-sm through rounded-full

Fonts

  • font-body, font-heading, font-mono

TypeScript

import type { BaseEmailProps, EmailTheme } from "@fulers/react-email";

interface MyEmailProps extends BaseEmailProps {
  customField: string;
}

Theme Configuration

Theme comes from Laravel's config/theme.php:

// config/theme.php
return [
    'themes' => [
        'light' => [
            'colors' => [
                'primary' => '#5469d4',
                // ...
            ],
        ],
    ],
];

The themeConfig is automatically passed to all emails via the Email abstract class.

RTL Support

Automatic RTL for Arabic, Hebrew, Persian, and Urdu:

// Automatically handled by EmailProvider
<EmailProvider {...props}>
  {/* Content flows RTL for ar, he, fa, ur locales */}
</EmailProvider>

Development

# Install dependencies
npm install

# Build package
npm run build

# Watch mode
npm run dev

License

MIT