solid-satori
v0.0.2
Published
Solid wrapper for Satori.
Downloads
8
Readme
solid-satori
Solid wrapper for Satori. Convert Solid components to SVG
Quick start
Install it:
npm i solid-satori
# or
yarn add solid-satori
# or
pnpm add solid-satori
Use it:
// routes/og.png.tsx
import { renderToSvg } from "solid-satori";
const svg: string = await renderToSvg(
() => (
<div>
Hello World
</div>
),
{
width: 1200,
height: 630,
fonts: [
...
],
},
);
Converting to Image
If you are using Node you can use @resvg/resvg-js
, for edge or browser you can use @resvg/resvg-wasm
.