Playground
Documentation
The what and the why of metaimg
Create a new Flyyer app using create-metaimg, which sets up everything automatically for you. To start a deck follow the steps below.
class MarkdownEditor extends React.Component {
constructor(props) {
super(props);
this.md = new Remarkable();
this.handleChange = this.handleChange.bind(this);
this.state = { value: 'Hello, **world**!' };
}
handleChange(e) {
this.setState({ value: e.target.value });
}
class MarkdownEditor extends React.Component {
constructor(props) {
super(props);
Create (if you don't have) a file with the desired name of your template in a directory called templates. Every deck created with create-flyyer-app starts with a file named templates/main.js, template/main.tsx, or template/main.vue.
Let's take https://github.com/useflyyer/create-flyyer-app/tree/master/templates/react as example
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>
<div className="layer background" style={{ backgroundImage: `url("${img}")` }} />
<div className="layer fade" />
<div className="layer content">
<img className="logo" src={logo} />
<h1 className="title">
{title}
</h1>
{description && (
<span className="description">
{description}
</span>
)}
</div>
</div>
);
}
Create a new Flyyer app using create-metaimg, which sets up everything automatically for you. To start a deck follow the steps below.
class MarkdownEditor extends React.Component {
constructor(props) {
super(props);
this.md = new Remarkable();
this.handleChange = this.handleChange.bind(this);
this.state = { value: 'Hello, **world**!' };
Social images are a great way to introduce users to a link on your website, before they even click on it. Remix makes dynamically generating images and adding it to your website much simpler compared to other React frameworks. By generating images using the canvas library, we can add lots of dynamic behavior to our images, in combination with the power that Remix gives us to control how it gets accessed and cached.