Carbon Badge
Embed a lightweight CO₂e badge — api mode (Insight) or estimate (local).
Web component @cometweb/carbon-badge (MIT). api measures a URL via the public API; estimate uses the current page’s Performance API weight. Transfer estimate — not an ESG certificate.
mode=api — Insight public API measures the given URL (here: cometweb.io).
urlURL for API (defaults to current). In estimate it does not drive page weight.modeapi | estimate — default apithemedark | lightcache-ttllocalStorage cache minutes (default 720 = 12h)api-urlhttps://app.cometweb.io/apigreen-hostestimate only — "true" lowers hosting factorThis estimates page transfer emissions — not an org-wide footprint or ESG certificate.
SWDM v4 model
CO₂e estimate via the Sustainable Web Design Model (Green Web Foundation). API responses also expose Insight formula_version.
~4.7 KB gzip
@cometweb/[email protected] — zero runtime dependencies.
api or estimate
api: GET /api/public/carbon-badge for the given URL. estimate: current page weight from the Performance API.
theme dark / light
Two built-in web component themes — no custom CSS required.
MIT license
Use commercially, self-host, modify — no fee for the widget.
Links to Ecology
Click opens cometweb.io/insight/ecology (module page), not an ESG certificate or a full project report.