Overview

The <Screenshot> component turns any URL into a polished, marketing-ready image — complete with device frames, gradient backdrops, drop shadows, perspective tilts, and optional AI-composed headlines. Renders happen server-side, are cached in KV, and served from a CDN, so your docs stay fast.

Screenshots are ideal for:

  • Product walkthroughs where you want real page captures, not static PNGs
  • Blog hero images and changelog art
  • Landing-page-style feature highlights inside your docs
mdx
<Screenshot url="https://example.com" preset="docs" />

Every render is cached by a hash of its props. Rebuilding your docs reuses prior renders instead of hitting the API again — only fresh renders count toward your monthly allowance.

Quick Start

Drop a <Screenshot> tag anywhere in your MDX:

mdx
<Screenshot url="https://docs.holydocs.com/components" preset="docs" alt="HolyDocs components documentation page"/>
HolyDocs components documentation page

On build, HolyDocs calls Screenframed, caches the result, and replaces the tag with an <img> pointing at the CDN URL. No API keys to manage — the integration is handled centrally. The default preset reads your active HolyDocs theme and chooses a matching Screenframed background, shadow, border, and corner radius.

Props

PropTypeDefaultDescription
urlstringrequiredThe page to capture.
presetenumdocsHolyDocs preset: docs, flat, hero, cinematic, mobile, detail, hero-headline, story-caption, tilted-corner-title, minimal-caption, or raw. Presets set sensible defaults while still allowing every Screenframed parameter to be overridden.
deviceenumnoneDevice frame: none, iphone-16-pro, ipad-pro-m4, macbook-pro-16, browser-macos, browser-windows. Omit or pass none for a raw deviceless capture.
deviceColorstringFrame color variant (e.g. black, silver).
deviceScalenumber0.85Scale factor for the device inside the composition.
backgroundstringtheme-matchedGradient preset (aurora, midnight, etc.) or hosted Screenframed background ref such as ethereal-golden-textures/ethereal-01. Pass none for no treatment.
backgroundColorstringSolid CSS color override, such as #0B0B0C.
backgroundGradientstringRaw CSS gradient override.
backgroundImageUrlstringCustom image URL override. This still works and overrides background.
paddingnumber80Pixels of padding around the framed device.
cornerRadiusnumber12Corner radius of the framed screenshot.
shadowenumnonenone, soft, hard, glow, float.
perspectiveenumnonenone, tilt-left, tilt-right, tilt-left-strong, tilt-right-strong, iso-left, iso-right.
perspectiveIntensitynumber500–100 strength of the perspective tilt.
layoutenumdefaultdefault, bottom-cropped, top-cropped — crop/offset strategy for the captured page.
depthBlurnumber00–30 depth blur intensity. Fades the far edge for a cinematic falloff.
titlestringOptional headline overlay baked into the image.
titleFontstringFont family for the title overlay (defaults to the API's built-in font).
titleSizenumberFont size in pixels.
titleColorstringHex color for the title text.
textEnabledbooleanfalseEnable a free-form text overlay baked into the image.
textContentstringText rendered by Screenframed.
textX / textYnumberText position as a 0-1 fraction of the output canvas.
textSize / textWeightnumberTypography controls for the text overlay.
textColor / textGradientstringSolid or gradient fill for the text overlay.
textShadowstringCSS text shadow for contrast against the background.
aibooleanfalseEnable all AI features at once (style, copy, auto-balance).
aiStylebooleanfalseLet AI classify the page type and pick a complementary composition.
aiCopybooleanfalseExtract a headline + subtitle from the page and render them as overlays.
autoBalancebooleanfalseAuto-detect dominant colors and pick a matching gradient.
aspectRatioenumautoauto, 16:9, 4:3, 1:1.
formatenumpngpng, webp, jpg.
widthnumberOutput width in pixels. Derived from the chosen device viewport (or 1440 for deviceless captures) unless overridden.
heightnumberOutput height in pixels. Derived the same way as width.
dprnumber1Device pixel ratio.
waitForstring3000Capture trigger: load, networkidle, domcontentloaded, or a millisecond delay. Defaults to waiting 3 seconds after navigation.
blockstringComma-separated block list: cookie-banners, ads, chat-widgets, popups.
injectCssstringInline CSS to inject before capture.
params / payloadJSON stringEscape hatch for full Screenframed payload overrides, including nested output values.
altstringAlt text for the output <img>. Falls back to title then url.

Examples

Theme-Matched Docs Preset

Use the default docs preset when the screenshot should feel native to the active HolyDocs theme:

mdx
<Screenshot url="https://docs.holydocs.com/components" preset="docs" alt="HolyDocs components documentation page"/>
HolyDocs components documentation page

Hero Preset

Use hero for a more dimensional product screenshot:

mdx
<Screenshot url="https://docs.holydocs.com/quickstart" preset="hero" alt="HolyDocs quickstart rendered with the hero preset"/>
HolyDocs quickstart rendered with the hero preset

Mobile Product View

The mobile preset uses an iPhone frame and a compact output shape:

mdx
<Screenshot url="https://holydocs.com/components" preset="mobile" alt="HolyDocs components page on mobile"/>
HolyDocs components page on mobile

Detail Preset

Use detail when the page should feel closer and more cropped:

mdx
<Screenshot url="https://docs.holydocs.com/api-playground" preset="detail" alt="HolyDocs API playground detail crop"/>
HolyDocs API playground detail crop

Story Caption Preset

Several presets include Screenframed text composition defaults. Use story-caption when the screenshot needs a baked-in caption without writing text props:

mdx
<Screenshot url="https://holydocs.com/components" preset="story-caption" alt="HolyDocs components screenshot with the story caption preset"/>
HolyDocs components screenshot with the story caption preset

Minimal Caption Preset

Use minimal-caption for a flatter framed capture with a bottom caption baked into the image:

mdx
<Screenshot url="https://docs.holydocs.com/components" preset="minimal-caption" alt="HolyDocs components screenshot with the minimal caption preset"/>
HolyDocs components screenshot with the minimal caption preset

Cinematic Preset

Use cinematic for a strong perspective view with depth blur:

mdx
<Screenshot url="https://docs.holydocs.com/quickstart" preset="cinematic" alt="HolyDocs quickstart rendered with the cinematic preset"/>
HolyDocs quickstart rendered with the cinematic preset

Raw Capture

Use raw when you want a plain captured page with no visual treatment:

mdx
<Screenshot url="https://holydocs.com" preset="raw" alt="Raw HolyDocs home page"/>
Raw HolyDocs home page

Caching

Every <Screenshot> render is fingerprinted by a SHA-256 hash of its canonical props (recursive, key-sorted). That hash is the KV cache key.

  • Cache hit — returns the prior CDN URL instantly; does not consume your plan allowance.
  • Cache miss — calls the Screenframed API, stores the result for 30 days, and increments your monthly counter.

This means rebuilding your docs after fixing a typo won't re-render any screenshots. Only genuinely new or changed captures count toward your quota.

Changing any prop — even whitespace inside a title — produces a new cache entry. Keep props stable if you want cache hits.

Background Catalog

Screenframed exposes available built-in backgrounds at:

bash
curl "https://screenframed.com/v1/backgrounds?limit=20&theme=dark"curl "https://screenframed.com/v1/backgrounds/packs"

The response includes built-in gradient presets, image backgrounds, CSS backgrounds, tags, thumbnails, and ready-to-use Screenframed parameter snippets such as background or background_gradient.

Plan Limits

Fresh renders (cache misses) count against a monthly allowance per your plan:

PlanScreenshot renders / month
Free25
Starter250
Pro1,500
Business8,000
EnterpriseUnlimited

When you exceed the limit, <Screenshot> falls back to an inline placeholder image with an "upgrade" notice. Your build never fails — the rest of the page renders normally.

Usage is visible on Settings → Billing under the "Screenshots" usage bar. The counter resets at the start of each calendar month.

Render Failures

If the Screenframed API call fails (network error, invalid URL, unreachable page), the component emits a placeholder and logs a warning to your build output. The reserved quota slot is automatically released so failed renders don't count against you.

See Also

Ask a question... ⌘I