Satori screenshot

Satori

Author Avatar Theme by Vercel
Updated: 13 May 2025
11823 Stars

Enlightened library to convert HTML and CSS to SVG

Overview:

Satori is an enlightened library that converts HTML and CSS to SVG. It supports JSX syntax, making it user-friendly for developers. It handles layout calculation, font, typography, and more to produce SVG images that closely resemble the original HTML and CSS styling.

Features:

  • JSX Support: Satori supports JSX syntax for easy usage.
  • Limited HTML and CSS Support: Satori supports a subset of HTML and CSS features for specific use cases.
  • Image Embedding: Images can be embedded using the <img> tag with recommended width and height attributes.
  • Flexbox Layout Engine: Utilizes a Flexbox layout engine similar to React Native for layout control.
  • Font Support: Supports TTF, OTF, and WOFF font formats, excluding WOFF2.

Installation:

To install Satori, you can use npm:

npm install satori

Once installed, you can import Satori into your project:

import Satori from 'satori';

Summary:

Satori is a powerful library that simplifies the process of converting HTML and CSS to SVG. With its support for JSX syntax and limited HTML and CSS features, it provides a convenient solution for generating SVG images. However, developers should be aware of the constraints and features supported by Satori, such as font formats and CSS properties.