Skip to main content

Getting started

Create project#

We recommend creating a new Flayyer app using create-flayyer-app, which sets up everything automatically for you. To start a project follow the steps below.

Using Yarn will create a folder called my-project in your current directory:
yarn create flayyer-app my-project

You will be prompted with multiple starting setups. You can choose the one that suites best for you.

? Select the best template setup for you โ€ฆ You can customize the template later

Your first template#


For more details about the available commands refer to Command-Line Interface.

Create (if you don't have) a file with the desired name of your template in a directory called templates. Every project created with create-flayyer-app starts with a file named templates/main.js, template/main.tsx, or template/main.vue.

Let's take as example

โ”‚ ...
โ”œโ”€โ”€ templates/
โ”‚ โ””โ”€โ”€ main.js
import React from "react";
import background from "../static/background.jpg";
import logo from "../static/logo.svg";
import "./styles.css"
// Make sure to 'export default' a React component
export default function MainTemplate({ variables }) {
const { title = "Hello world!", img = background, description, } = variables;
return (
<div className="layer background" style={{ backgroundImage: `url("${img}")` }} />
<div className="layer fade" />
<div className="layer content">
<img className="logo" src={logo} />
<h1 className="title">
{description && (
<span className="description">

Start the development server with:
yarn start

Please use Google Chrome, Firefox or Opera. Safari is not widely supported.

This command starts a development server using Parcel.js. Then open Flayyer Studio in your browser for a better developer experience.

Flayyer Studio screenshot


Work on your template, try changing the variables and when you are ready, run:
NODE_ENV=production yarn build

To upload the final bundled templates to our cloud you must have an API Key.

Click here to manage your keys ๐Ÿ”‘

When you are ready to deploy, run:
yarn run deploy

If everything is correct, you should see an output with your templates' URLs.

๐Ÿ–ผ Created template with URL:

Congratulations! You deployed your first Flayyer project! ๐ŸŽ‰

Resultant flayyer live image

Resultant flayyer live image

Here are some examples of how to pass parameters to create images:

  • Set extension
  • Set dimensions:
    • Instagram post:
    • Whatsapp image:
    • Story:
  • Replace variables:

To format URL we recommend using one of official libraries.

cat on a rocket

Continue reading this documentation to understand more about Flayyer and what other amazing features we support.