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

zarcanvas

v1.0.0

Published

ZarCanvas is a native canvas library for crafting stylish, modern card designs.

Readme

ZarCanvas 🎨

zarcanvas-banner

NPM Version License: ISC Node.js Discord GitHub NPM Downloads


ZarCanvas

ZarCanvas is a native canvas library for creating modern, visually clean cards. Optimized for social media simulation and music player visuals.


🚀 Installation

npm install zarcanvas

🛠️ Usage Examples

1. Music Card

Perfect for "Now Playing" visuals with gradient support.

Full Version (With Progress)

music-card

import { MusicCard } from 'zarcanvas';
import fs from 'node:fs';

const card = new MusicCard({
  trackName: 'MONTAGEM ZAR',
  artistName: 'ZarScape',
  albumArt: 'https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png',
  backgroundColor: '#082131ff',
  gradientColor: '#467ca0ff',
  progressBar: 75,
  progressTime: '2:30 / 3:12',
  trackNameColor: '#bacfddff',
  artistNameColor: '#abc2d1ff',
  progressTimeColor: '#9cb4c4ff',
  progressBarColor: ['#2a4a5aff', '#68b3d8']
});

const buffer = await card.build();
fs.writeFileSync('music_full.png', buffer);

Minimal Version (No Progress)

minimal-music-card

const minimalCard = new MusicCard({
  trackName: 'MONTAGEM ZAR',
  artistName: 'ZarScape',
  albumArt: 'https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png',
  backgroundColor: '#082131ff',
  gradientColor: '#467ca0ff',
  trackNameColor: '#bacfddff',
  artistNameColor: '#abc2d1ff'
});

const buffer = await minimalCard.build();
fs.writeFileSync('music_minimal.png', buffer);

2. Profile Card

Designer profile card with background blur and frame effects.

profile-card

import { ProfileCard } from 'zarcanvas';

const card = new ProfileCard({
  avatarURL: 'https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png',
  decorationURL: 'https://cdn.discordapp.com/avatar-decoration-presets/a_64c339e0c128dcb279ae201b1190d9d3.png',
  backgroundURL: 'https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/banner-with-text.png',
  userName: 'zarscape',
  userDisplayname: 'ZarScape',
  backgroundBlur: 20,
  usernameColor: '#b8e7ff',
  borderColor: ['#60a5c7', '#193542ff']
});

const buffer = await card.build();

3. Instagram Card

Authentic Instagram post simulation.

muinstagram-card

import { InstagramCard } from 'zarcanvas';

const card = new InstagramCard({
  username: "ZarScape",
  avatar: "https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png",
  postImage: "https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png",
  likeCount: 125000,
  verified: true,
  postDate: new Date(Date.now() - 86400000)
});

const buffer = await card.generate();

4. Tweet (X) Card

Native X/Twitter post simulation using Chirp fonts.

tweet-card

import { TweetCard } from 'zarcanvas';

const card = new TweetCard({
  user: { 
    displayName: 'Muhammad Abuzar', 
    username: 'zarscape' 
  },
  message: 'Testing X (tweet) card using ZarCanvas. Looks awesome! #ZarCanvas #Design #ZarScape',
  verified: true,
  stats: {
    replies: 124,
    retweets: 850,
    likes: '12K',
    views: '250K'
  }
});

const buffer = await card.build();

5. Ship Card

Compare two profiles with a love percentage and themed icons.

ship-card

import { ShipCard } from 'zarcanvas';

const card = new ShipCard()
  .setAvatar1('https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png')
  .setAvatar2('https://raw.githubusercontent.com/ZarScape/ZarScape/refs/heads/main/images/ZarScape/logo-with-background.png')
  .setPercentage(95);

const buffer = await card.build();

📦 API Reference

Music Card (MusicCardOptions)

| Property | Type | Required | Description | Default | | :--- | :--- | :---: | :--- | :--- | | trackName | string | ✅ | Title of the track. | - | | artistName | string | ✅ | Name of the artist. | - | | albumArt | string | ✅ | URL or path to artwork. | - | | backgroundColor | string | ✅ | Background hex/CSS color. | - | | gradientColor | string | ✅ | Color for decorative glow. | - | | trackNameColor | string | ❌ | Track title hex color. | #000000 | | artistNameColor| string | ❌ | Artist name hex color. | #555555 | | progressBar | number | ❌ | Percentage (0-100). | undefined | | progressBarColor| string \| string[] | ❌ | Solid or gradient color. | #000000 | | progressTime | string | ❌ | Time text (e.g. "2:30 / 4:00"). | undefined |

Profile Card (ProfileCardOptions)

| Property | Type | Required | Description | Default | | :--- | :--- | :---: | :--- | :--- | | avatarURL | string | ✅ | Main profile avatar URL. | - | | userName | string | ✅ | The handle/username (with @). | - | | userDisplayname| string | ❌ | Large display title. | userName | | backgroundBlur | number | ❌ | Blur intensity (0-100). | 20 | | usernameColor | string | ❌ | Hex color for the title. | #b8e7ff | | borderColor | string \| string[] | ❌ | Solid or gradient border. | undefined | | squareAvatar | boolean | ❌ | Use square instead of circle avatar. | false |

Instagram Card (InstagramCardOptions)

| Property | Type | Required | Description | Default | | :--- | :--- | :---: | :--- | :--- | | username | string | ✅ | Instagram handle. | - | | avatar | string | ✅ | Profile image URL. | - | | postImage | string | ✅ | Main post content image URL. | - | | likeCount | number | ✅ | Total number of likes. | - | | verified | boolean | ❌ | Shows blue verified badge. | true | | postDate | Date \| number| ❌ | Date of the post. | Date.now() |

X (Tweet) Card (TweetCardOptions)

| Property | Type | Required | Description | Default | | :--- | :--- | :---: | :--- | :--- | | user | object | ✅ | { displayName: string, username: string } | - | | message | string | ✅ | The tweet content text. | - | | stats | object | ✅ | { replies, retweets, likes, views } | - | | verified | boolean | ❌ | Shows blue checkmark badge. | true | | timestamp | string | ❌ | Relative time (e.g. "1h"). | 1h | | avatar | string | ❌ | Profile image URL. | ZarScape Logo |

Ship Card (ShipCardOptions)

| Property | Type | Required | Description | Default | | :--- | :--- | :---: | :--- | :--- | | avatar1 | string | ✅ | First user avatar URL. | - | | avatar2 | string | ✅ | Second user avatar URL. | - | | percentage | number | ✅ | Love percentage (0-100). | - | | background | string | ❌ | Background image URL. | Default Gradient | | font | string | ❌ | Custom font family name. | Plus Jakarta Sans |


🛡️ Guide & Tips

Best Visual Results

  • Images: Use high-resolution square images for avatars to prevent stretching or warping.
  • Gradients: For properties accepting string[], providing 2-3 hex codes creates a smooth professional linear transition.
  • Async Handling: All card generation methods are asynchronous. Always use await when calling .build() or .generate()..

📜 License

ISC © Muhammad Abuzar (ZarScape)