npm.io
0.0.5 • Published 3 years ago

@memefighter/maker-svelte

Licence
Version
0.0.5
Deps
1
Size
10 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

The Svelte Meme Fighter Meme Maker

Drop-in meme creation for svelte apps.

meme maker

Getting Started

This package provides drop-in react component for creating memes. For other frameworks, see ([@memefighter/maker-core](https://www.npmjs.com/package/@memefighter/maker-core)).

npm i @memefighter/maker-svelte

<script lang="ts">
  import MemeMaker from "@memefighter/maker-svelte/index.svelte";

  /** Function which receives the meme as an image url when the user has finished creating it. */
  function handler (meme) {};

  /** Customize the appearance of the meme maker. These are all the options currently available. */
  const styleVariables = {
    "--foreground-color": "#fff",
    "--background-color": "#111",
    "--button-color": "#333"
  };

  /** Declare the width of the embedded meme maker iframe. */
  const width = 400;

  /** Declare the height of the embedded meme maker iframe. */
  const height = 400;
</script>

<main>
  <MemeMaker {handler} {styleVariables} {width} {height} />;
</main>

See a functioning example on code sandbox.