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

@ienznotfound/smeme-canvas

v1.0.2

Published

Generate classic top/bottom text memes (PNG) and animated progressive text-reveal videos (GIF) directly in Node.js! Inspired by [brat-canvas](https://www.npmjs.com/package/brat-canvas).

Readme

@ienznotfound/smeme-canvas

Generate classic top/bottom text memes (PNG) and animated progressive text-reveal videos (GIF) directly in Node.js! Inspired by brat-canvas.

✨ Features

  • Static Memes: Add classic impact-style top and bottom text to any image.
  • Animated Text GIFs: Create videos where the text appears word-by-word. No ffmpeg required!
  • Animated Backgrounds (smemegif): Process animated GIF/WebP backgrounds while retaining their animation.
  • Full Emoji Support: Built-in support for OS emojis, with .addFontEmoji() for custom emoji fonts.
  • Chainable API: Easy-to-use builder pattern.
  • Auto-Scaling: Font size automatically adjusts so it never gets cut off.
  • Customizable Colors: Set different colors for top and bottom text.

📦 Installation

npm install @ienznotfound/smeme-canvas

🚀 Quick Start

1. Static Image (PNG)

const fs = require('fs');
const { smeme } = require('@ienznotfound/smeme-canvas');

async function createMeme() {
  // You can pass an Image URL, a Local File Path (e.g., './my-image.jpg'), or a Buffer!
  const imgBuffer = await new smeme('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ7v_9SzhgpY9LrmrzVHLq9dssHoIor1GrjAO40N6pXP1Yj9zTgmFAuXp91&s=10')
    .addTextTop('NO STRESS')
    .addTextBottom('JUST VIBING')
    .colorTop('yellow')   // Top text color
    .colorBottom('white') // Bottom text color
    .fontSize(100)        // Optional: Leave empty for auto-scaling
    .fontStyle('Impact')  
    .addFontEmoji('Noto Color Emoji') // Support emojis effortlessly! 😂
    .generate();
    
  fs.writeFileSync('output.png', imgBuffer);
}
createMeme();

2. Animated Video (GIF)

Text will appear word-by-word!

const fs = require('fs');
const { smeme } = require('@ienznotfound/smeme-canvas');

async function createAnimatedMeme() {
  // Local paths are also supported, no need to download from the web!
  const gifBuffer = await new smeme('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ7v_9SzhgpY9LrmrzVHLq9dssHoIor1GrjAO40N6pXP1Yj9zTgmFAuXp91&s=10')
    .addTextTop('NO STRESS')
    .addTextBottom('JUST VIBING')
    .color('white')       // Sets both top and bottom text color
    .gif({ delay: 500 }) // Delay per word in milliseconds
    .generate();
    
  fs.writeFileSync('output.gif', gifBuffer);
}
createAnimatedMeme();

3. Animated Background Meme (smemegif)

Process animated GIF or WebP images and retain their animation while drawing static text or animated text on top!

const fs = require('fs');
const { smemegif } = require('@ienznotfound/smeme-canvas');

async function createAnimatedBackgroundMeme() {
  const animBuffer = await new smemegif('https://media.tenor.com/EjlzWbUoN3wAAAA1/prabowo.webp')
    .addTextTop('KETIKA KAMU')
    .addTextBottom('HIDUP JOKOWI 🇮🇩')
    .color('white')
    .gif() // Optional: Makes the text appear word-by-word synchronised to the GIF
    .generate();
    
  fs.writeFileSync('output_prabowo.gif', animBuffer);
}
createAnimatedBackgroundMeme();

🎨 Supported Colors

Because this library uses a native Canvas renderer, you can use ANY HTML/CSS Color Format:

  • Names: 'white', 'black', 'red', 'blue', 'yellow', 'cyan', 'magenta', dll.
  • HEX Codes: '#FFFFFF', '#FF5733'
  • RGB / RGBA: 'rgb(255, 255, 255)', 'rgba(0, 0, 0, 0.5)'

🔤 Supported Fonts

By default, the library can read all fonts installed on your operating system. Some popular fonts you can use immediately:

  • Meme Standard: 'Impact', 'Arial', 'Comic Sans MS', 'Tahoma'
  • Modern: 'Segoe UI', 'Calibri', 'Verdana'
  • Monospace: 'Consolas', 'Courier New'
  • Others: 'Georgia', 'Times New Roman'

Just pass the font name into .fontStyle('Font Name')!

😃 Emoji Support

smeme-canvas automatically falls back to "Segoe UI Emoji", "Apple Color Emoji", and "Noto Color Emoji" if an emoji is drawn. If you want to use a specific emoji font you registered using @napi-rs/canvas, simply use .addFontEmoji('My Emoji Font').