# Animated stat card (1080x1080)

**Use case:** 

Render a 6-second, 1080×1080 MP4 where your number counts up inside a filling ring, then your caption and logo settle in. Made for milestone posts on X, LinkedIn and Instagram. Edit the CONFIG block at the top of the HTML (value, label, caption, brand, colour) and run. Rendered by MP4 Renderer for HyperFrames, about $0.13 per run.

## Input

```json
{
  "html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=1080, height=1080\">\n<title>Animated stat card</title>\n<script>\n/* =====================================================================\n   EDIT ME: change only the values in this block, then render.\n   ===================================================================== */\nconst CONFIG = {\n  value:   10000,                         // the number the counter ticks up to\n  prefix:  \"\",                            // shown before the number, e.g. \"$\"\n  suffix:  \"\",                            // shown after the number, e.g. \"+\" or \"%\"\n  label:   \"users\",                       // word under the number\n  caption: \"Thanks for building with us\", // line under the ring\n  brand:   \"Your App\",                    // wordmark next to the logo at the end\n  accent:  \"#5eead4\"                      // ring, logo and highlight colour\n};\n/* ===================================================================== */\n</script>\n<script src=\"https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js\"></script>\n<style>\n:root{--bg:#0a0c10;--tx:#eef1f6;--mu:#97a0b2;--ln:#1f2530;--ac:#5eead4}\n*{margin:0;padding:0;box-sizing:border-box}\nhtml,body{width:1080px;height:1080px;overflow:hidden;background:var(--bg)}\nbody{font-family:\"Inter\",\"Noto Sans\",\"Liberation Sans\",Arial,sans-serif;color:var(--tx);-webkit-font-smoothing:antialiased}\n#root{position:relative;width:1080px;height:1080px;overflow:hidden;background:var(--bg)}\n#grid{position:absolute;inset:0;background-image:radial-gradient(rgba(238,241,246,.06) 1.5px,transparent 1.5px);background-size:40px 40px}\n#glow{position:absolute;left:40px;top:-60px;width:1000px;height:1000px;border-radius:50%;background:radial-gradient(circle,rgba(94,234,212,.14) 0%,rgba(94,234,212,0) 60%)}\n#vig{position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 55%,rgba(0,0,0,.55) 100%)}\n#ring{position:absolute;left:220px;top:130px;width:640px;height:640px}\n#center{position:absolute;left:220px;top:130px;width:640px;height:640px;display:flex;flex-direction:column;align-items:center;justify-content:center}\n#num{font-size:148px;font-weight:800;letter-spacing:-.03em;line-height:1;font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\" 1;white-space:nowrap}\n#label{margin-top:22px;font-size:44px;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--ac)}\n#caption{position:absolute;left:0;width:1080px;top:820px;text-align:center;font-size:46px;font-weight:600;color:var(--tx)}\n#brand{position:absolute;left:0;width:1080px;top:930px;display:flex;align-items:center;justify-content:center;gap:18px}\n#brand .nm{font-size:34px;font-weight:700;color:var(--mu);letter-spacing:.01em}\n</style>\n</head>\n<body>\n<div id=\"root\" data-composition-id=\"stat-card\" data-width=\"1080\" data-height=\"1080\" data-duration=\"6\" data-fps=\"30\">\n  <div id=\"grid\"></div><div id=\"glow\"></div><div id=\"vig\"></div>\n  <svg id=\"ring\" viewBox=\"0 0 640 640\">\n    <circle cx=\"320\" cy=\"320\" r=\"296\" fill=\"none\" stroke=\"#1f2530\" stroke-width=\"22\"/>\n    <circle id=\"arc\" cx=\"320\" cy=\"320\" r=\"296\" fill=\"none\" stroke=\"#5eead4\" stroke-width=\"22\" stroke-linecap=\"round\"\n            transform=\"rotate(-90 320 320)\" stroke-dasharray=\"1859.8\" stroke-dashoffset=\"1859.8\"/>\n  </svg>\n  <div id=\"center\"><div id=\"num\">0</div><div id=\"label\">users</div></div>\n  <div id=\"caption\">Thanks for building with us</div>\n  <div id=\"brand\">\n    <svg id=\"logo\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\"><rect width=\"56\" height=\"56\" rx=\"14\" fill=\"#5eead4\"/><path d=\"M16 34l12-12 12 12\" fill=\"none\" stroke=\"#0a0c10\" stroke-width=\"5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M16 24l12-12 12 12\" fill=\"none\" stroke=\"#0a0c10\" stroke-width=\"5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" opacity=\".45\"/></svg>\n    <span class=\"nm\">Your App</span>\n  </div>\n</div>\n<script>\n(function(){\n  var C=CONFIG, $=function(s){return document.querySelector(s)};\n  document.documentElement.style.setProperty(\"--ac\",C.accent);\n  $(\"#arc\").setAttribute(\"stroke\",C.accent);\n  $(\"#logo rect\").setAttribute(\"fill\",C.accent);\n  $(\"#label\").textContent=C.label; $(\"#caption\").textContent=C.caption; $(\"#brand .nm\").textContent=C.brand;\n  var fmt=function(v){return C.prefix+Math.round(v).toLocaleString(\"en-US\")+C.suffix};\n  /* shrink the number if a long value would overflow the ring */\n  var num=$(\"#num\"); num.textContent=fmt(C.value);\n  var fs=148; while(num.scrollWidth>520&&fs>60){fs-=4;num.style.fontSize=fs+\"px\";}\n  num.textContent=fmt(0);\n  var L=1859.8, E=\"power3.out\", o={v:0};\n  var tl=gsap.timeline({paused:true});\n  tl.fromTo(\"#ring\",{autoAlpha:0,scale:.92},{autoAlpha:1,scale:1,duration:.7,ease:E,transformOrigin:\"50% 50%\"},0);\n  tl.fromTo(\"#num\",{autoAlpha:0,y:24},{autoAlpha:1,y:0,duration:.6,ease:E},.2);\n  tl.fromTo(\"#label\",{autoAlpha:0,y:16},{autoAlpha:1,y:0,duration:.6,ease:E},.6);\n  tl.to(\"#arc\",{attr:{\"stroke-dashoffset\":0},duration:3.2,ease:\"power2.inOut\"},.4);\n  tl.to(o,{v:C.value,duration:3.2,ease:\"power2.inOut\",onUpdate:function(){num.textContent=fmt(o.v)}},.4);\n  tl.to(\"#num\",{scale:1.06,duration:.2,yoyo:true,repeat:1,ease:\"sine.inOut\",transformOrigin:\"50% 50%\"},3.6);\n  tl.to(\"#arc\",{attr:{\"stroke-width\":28},duration:.2,yoyo:true,repeat:1,ease:\"sine.inOut\"},3.6);\n  tl.fromTo(\"#caption\",{autoAlpha:0,y:30},{autoAlpha:1,y:0,duration:.7,ease:E},3.8);\n  tl.fromTo(\"#logo\",{autoAlpha:0,scale:.4,rotation:-20},{autoAlpha:1,scale:1,rotation:0,duration:.8,ease:\"back.out(1.8)\",transformOrigin:\"50% 50%\"},4.4);\n  tl.fromTo(\"#brand .nm\",{autoAlpha:0,x:-14},{autoAlpha:1,x:0,duration:.6,ease:E},4.6);\n  tl.to({},{duration:6},0);\n  window.__timelines=window.__timelines||{};\n  window.__timelines[\"stat-card\"]=tl;\n  tl.seek(0);\n})();\n</script>\n</body>\n</html>\n",
  "entryFile": "index.html",
  "format": "mp4",
  "fps": 30,
  "quality": "standard",
  "variables": {}
}
```

## Output

```json
{
  "videoUrl": {
    "label": "MP4",
    "format": "string"
  },
  "durationSeconds": {
    "label": "Duration (s)",
    "format": "number"
  },
  "width": {
    "label": "Width",
    "format": "integer"
  },
  "height": {
    "label": "Height",
    "format": "integer"
  },
  "fps": {
    "label": "FPS",
    "format": "integer"
  },
  "quality": {
    "label": "Quality",
    "format": "string"
  },
  "frameUnits": {
    "label": "frames-30 events",
    "format": "integer"
  },
  "expectedChargeUsd": {
    "label": "Expected charge (USD)",
    "format": "number"
  },
  "sizeBytes": {
    "label": "Size (bytes)",
    "format": "integer"
  },
  "renderTimeMs": {
    "label": "Render time (ms)",
    "format": "integer"
  },
  "warnings": {
    "label": "Warnings",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The MP4 Renderer for HyperFrames (Unofficial) Actor is ready to run with the inputs already set for "Animated stat card (1080x1080)". [Sign up or log in](https://console.apify.com/create-task-from-example/dRTj5k9262olCwp4u) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Animated stat card (1080x1080)" task

The MP4 Renderer for HyperFrames (Unofficial) Actor will start running based on the input automatically. You can also change all the input fields, like inline html, entry file (zip only), and more, to match your specific use case.

### 3. Receive the "Animated stat card (1080x1080)" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as MP4, duration (s), width, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Animated stat card (1080x1080)" task via API](https://apify.com/optimdex/hyperframes-render.md).

## About this Actor

This example demonstrates how to use [MP4 Renderer for HyperFrames (Unofficial)](https://apify.com/optimdex/hyperframes-render.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/optimdex/hyperframes-render.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/optimdex/hyperframes-render.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
