0.0.18 • Published 7 months ago

@memefighter/maker-core v0.0.18

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

The Meme Fighter Meme Maker

Drop-in meme creation for web apps.

meme maker

Getting Started

With Your Favorite Framework

Basic Example

npm i @memefighter/maker-core

import { start } from "@memefigher/maker-core";

function handler(memeImgUrl: string) {
  // Do something with the meme created by the user
}

function makeAMeme() {
  // Create an iframe element and retrieve a reference
  const iframe = document.querySelector("iframe");

  // Customize the appearance
  const styleVariables = {
    "--background-color": "#121212",
  };

  // Start the meme creation flow and pass the result to our handler
  start({
    iframe,
    styleVariables,
  }).then(handler);
}

⚠️ We recommend using the following style rule on your iframe:

iframe {
  aspect-ratio: 1;
  max-width: 100%;
  width: auto;
  height: auto;
}

Interface

The meme maker provides a basic level of aesthetic customization, and returns a url string pointing to the meme created by the user, which you can use in your app as you please.

function start ({
  /** Reference to the iframe which will house the meme maker. */
  iframe: HTMLIFrameElement;
  /** Customize the appearance of the meme maker. */
  styleVariables?: {
    /** Background color for the meme maker iframe. */
    "--background-color"?: string;
    /** Text color for the meme maker iframe. */
    "--foreground-color"?: string;
    /** Button color for the meme maker iframe. */
    "--button-color"?: string;
  };
}): string;
0.0.18

7 months ago

0.0.17

9 months ago

0.0.16

9 months ago

0.0.14

9 months ago

0.0.13

9 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago