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

bloggy-embed

v1.0.2

Published

React components to embed blogs from an API.

Readme

bloggy-embed

📝 bloggy-embed — Embeddable blog components for React for blog content rendering.

Easily showcase your blogs on any React-based website with beautiful prebuilt components like BlogCard and BlogEmbed.


✨ Features

  • 📦 Plug-and-play blog embed components
  • 🎨 Responsive design out of the box
  • 🖋 Tiptap-powered rich text rendering
  • Lightweight & fast
  • 🔄 Works with your own blog API

📦 Installation

npm install bloggy-embed


🚀 Usage Example
Below is an example of how to fetch blog data from your API and display it using bloggy-embed.


// src/App.tsx
import { useState, useEffect } from 'react';
import { BlogCard, BlogEmbed } from 'bloggy-embed';
import type { Blog } from 'bloggy-embed';

const API_URL = 'Your API';

function App() {
  const [blogs, setBlogs] = useState<Blog[]>([]);
  const [selectedBlog, setSelectedBlog] = useState<Blog | null>(null);

  useEffect(() => {
    fetch(API_URL)
      .then((res) => res.json())
      .then((data) => {
        setBlogs(data.message.entries);
      })
      .catch((err) => {
        console.error('Failed to fetch blogs:', err);
      });
  }, []);

  return (
    <div className="min-h-screen bg-gray-50 p-6">
      <h1 className="text-4xl font-bold text-center mb-8">Latest Blogs</h1>

      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
        {blogs.map((blog) => (
          <BlogCard key={blog._id} blog={blog} onClick={() => setSelectedBlog(blog)} />
        ))}
      </div>

      {selectedBlog && (
        <div className="fixed inset-0 bg-white z-50 overflow-y-auto px-4 py-6">
          <BlogEmbed
            blog={selectedBlog}
            showBackButton
            onBack={() => setSelectedBlog(null)}
          />
        </div>
      )}
    </div>
  );
}

export default App;


📚 Components
1️⃣ BlogCard
Displays a compact preview of a blog post.

| Prop      | Type         | Description                                             |
| --------- | ------------ | ------------------------------------------------------- |
| `blog`    | `Blog`       | The blog object containing title, content, author, etc. |
| `onClick` | `() => void` | Callback when the card is clicked.                      |


2️⃣ BlogEmbed
Displays the full blog content.

| Prop             | Type         | Description                               |
| ---------------- | ------------ | ----------------------------------------- |
| `blog`           | `Blog`       | The blog object to render.                |
| `showBackButton` | `boolean`    | Whether to show a back button.            |
| `onBack`         | `() => void` | Callback when the back button is clicked. |


🔌 Blog Type Definition
The Blog type is included for convenience:

export interface Blog {
  _id: string;
  title: string;
  content: any; 
  author?: string;
  createdAt?: string;
  coverImage?: string;
}



🎨 Styling
The components come with minimal default styles.

You can wrap them in your own CSS framework or Tailwind utility classes for customization.