Supported CSS Properties
Satori supports a robust subset of CSS. Key properties include:Layout
Layout
display: flex(Default for most elements)flex-directionjustify-contentalign-itemsalign-contentflex-wrapflex(shorthand and individual grow/shrink/basis)position(relative,absolute)top,right,bottom,left
Typography
Typography
font-family-font-size-font-weight-font-style-text-align-color-line-height-letter-spacing-text-overflow(clip,ellipsis) -overflow(hidden,visible) -white-space(normal,nowrap,pre-wrap)
Visuals
Visuals
background-color-background-image(linear-gradient, radial-gradient, url) -background-size,background-position,background-repeat-border(and individual sides) -border-radius-box-shadow-opacity-transform
Sizing & Spacing
Sizing & Spacing
width,heightmin-width,min-height,max-width,max-heightpadding(and individual sides)margin(and individual sides)gap
Supported Elements
In JSX templates, use Satori-compatible elements with thetw prop or style prop:
div, span, img, svg, path. Use htmlSnippet for inline styled text inside headings.
clsx Utility
OGify exports aclsx helper for building conditional class strings in JSX templates. It supports strings, arrays, objects, and boolean guards:
htmlSnippet for Inline HTML
Satori cannot render arbitrary inline HTML inside text nodes (vercel/satori#484). UsehtmlSnippet to parse trusted HTML fragments into per-word flex containers:
span, b, strong, em, i, br. Use class on <span> elements for Tailwind-like styling.
Tailwind-like Utilities
OGify includes a utility class processor (clsx + a mini-Tailwind engine) that maps class names to styles via the tw prop.
Common Mappings
- Layout
- Sizing
- Typography
- Visuals
flex,flex-row,flex-colitems-center,items-start,items-end,items-stretchjustify-center,justify-start,justify-between,justify-aroundabsolute,relative,inset-0