Skip to main content

Libraries

Dealing with URL serialization is tough, specially if you have complex variables.

We have some libraries to make this process of creating a Flayyer URL easier for developers.

import { FlayyerIO } from "@flayyer/flayyer";
const flayyer = new FlayyerIO({
tenant: "tenant",
deck: "deck",
template: "template",
variables: { title: "Hello world!" },
meta { id: "item-name" /* for analytics reports */ },
});
const url = flayyer.href();
// > https://flayyer.io/v2/tenant/deck/template.jpeg?__v=1596906866&title=Hello+world%21
// Use this `url` in the <head /> of your HTML
<meta property="og:image" content={url} />
<meta name="twitter:image" content={url} />

Official#

note

These libraries are for composing and formatting parameters into Flayyer URLs, not for creating Flayyer projects. To create a project go to Getting started.