Embed StatusCodeFYI widgets — status codes, glossary terms, interactive tools, and inline elements — on any website. 8 widget types, zero dependencies, Shadow DOM style isolation, 4 built-in themes (light, dark, sepia, auto), 2 styles (modern, clean), and live data from the StatusCodeFYI database.
Every widget includes a "Powered by StatusCodeFYI" backlink directing readers to the full reference.
Try the interactive widget builder at widget.statuscodefyi.com
<!-- Place widget div where you want it to appear -->
<div data-statuscodefyi="entity" data-slug="codes" data-theme="light"></div>
<!-- Load the embed script once, anywhere on the page -->
<script src="https://cdn.jsdelivr.net/npm/statuscodefyi-embed@1/dist/embed.min.js"></script>That's it. The widget fetches data from the StatusCodeFYI API and renders with full style isolation.
| Type | Usage | Description |
|---|---|---|
entity |
<div data-statuscodefyi="entity" data-slug="..."></div> |
Entity detail card — cable, ASN, or status code |
glossary |
<div data-statuscodefyi="glossary" data-slug="..."></div> |
Glossary term definition with cross-references |
search |
<div data-statuscodefyi="search" data-slug="..."></div> |
Search box linking to the full database |
compare |
<div data-statuscodefyi="compare" data-slug="..."></div> |
Side-by-side entity comparison |
faq |
<div data-statuscodefyi="faq" data-slug="..."></div> |
FAQ accordion with expand/collapse |
protocol |
<div data-statuscodefyi="protocol" data-slug="..."></div> |
Protocol card — name, port, description, code count |
scenario |
<div data-statuscodefyi="scenario" data-slug="..."></div> |
Error scenario debugging card — symptoms, diagnosis, resolution |
status-badge |
<div data-statuscodefyi="status-badge" data-slug="..."></div> |
Inline 1xx/2xx/3xx/4xx/5xx colored badge |
| Attribute | Values | Default | Description |
|---|---|---|---|
data-statuscodefyi |
entity, compare, glossary, search, faq, [tools] | required | Widget type |
data-slug |
e.g. "codes" | — | Entity slug from the StatusCodeFYI database |
data-theme |
light, dark, sepia, auto | light | Visual theme (auto follows OS preference) |
data-style-variant |
modern, clean | modern | Widget design style |
data-size |
default, compact, large | default | Widget size |
data-placeholder |
any string | "Search Status Codes..." | Search box placeholder |
<!-- Light (default) -->
<div data-statuscodefyi="entity" data-slug="codes" data-theme="light"></div>
<!-- Dark -->
<div data-statuscodefyi="entity" data-slug="codes" data-theme="dark"></div>
<!-- Sepia -->
<div data-statuscodefyi="entity" data-slug="codes" data-theme="sepia"></div>
<!-- Auto — follows OS dark/light preference -->
<div data-statuscodefyi="entity" data-slug="codes" data-theme="auto"></div><!-- Modern (default) — gradient header, rounded cards, accent colors -->
<div data-statuscodefyi="entity" data-slug="codes" data-style-variant="modern"></div>
<!-- Clean — minimal borders, data-first aesthetic -->
<div data-statuscodefyi="entity" data-slug="codes" data-style-variant="clean"></div><statuscodefyi-entity slug="codes" theme="light"></statuscodefyi-entity>
<statuscodefyi-compare slug-a="item-a" slug-b="item-b"></statuscodefyi-compare>
<statuscodefyi-search placeholder="Search Status Codes..."></statuscodefyi-search>
<script src="https://cdn.jsdelivr.net/npm/statuscodefyi-embed@1/dist/embed.min.js"></script>Use style-variant (not style) to avoid conflicts with the HTML reserved style attribute.
<script src="https://cdn.jsdelivr.net/npm/statuscodefyi-embed@1/dist/embed.min.js"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/embed.min.js"></script>npm install statuscodefyi-embedimport 'statuscodefyi-embed';- Shadow DOM: Complete style isolation — no CSS conflicts with your site
- Zero dependencies: No jQuery, React, or any external library
- 2 styles: Modern (accent gradients) and Clean (minimal, data-first)
- 4 themes: Light, Dark, Sepia, Auto (OS preference detection)
- CORS: StatusCodeFYI API has CORS enabled for all origins
- MutationObserver: Works with dynamically added elements (SPAs)
- IntersectionObserver: Lazy loading — widgets only fetch when entering viewport (200px margin)
- Rich Snippets: DefinedTerm JSON-LD injected for glossary widgets
- Bundle size: Tree-shaken per site — only includes tools available on StatusCodeFYI
Visit statuscodefyi.com — StatusCodeFYI is a comprehensive status codes reference with interactive tools, guides, and developer resources.
- API docs: statuscodefyi.com/developers/
- Widget builder: widget.statuscodefyi.com
- npm package: npmjs.com/package/statuscodefyi-embed
- GitHub: github.com/fyipedia/statuscodefyi-embed
Part of FYIPedia — open-source developer tools ecosystem. Network FYI covers cables, IP networks, and protocol status codes. Hub: wirefyi.com.
| Site | Domain | Focus | Package |
|---|---|---|---|
| CableFYI | cablefyi.com | 151 cables, connectors, standards, compatibility | npm |
| IPFYI | ipfyi.com | ASN, ISP, IP ranges, network infrastructure | npm |
| StatusCodeFYI | statuscodefyi.com | HTTP/SMTP/gRPC status codes, protocols, debugging | npm |
| TLDFYI | tldfyi.com | TLD registry, domain extensions (coming soon) | Coming soon |
| Package | PyPI | npm | Description |
|---|---|---|---|
| colorfyi | PyPI | npm | Color conversion, WCAG contrast, harmonies — colorfyi.com |
| emojifyi | PyPI | npm | Emoji encoding & metadata for 3,953 emojis — emojifyi.com |
| unitfyi | PyPI | npm | Unit conversion, 220 units — unitfyi.com |
| fyipedia | PyPI | — | Unified CLI for all FYI tools — fyipedia.com |
Embed StatusCodeFYI widgets on any website with statuscodefyi-embed:
<script src="https://cdn.jsdelivr.net/npm/statuscodefyi-embed@1/dist/embed.min.js"></script>
<div data-statuscodefyi="entity" data-slug="example"></div>Zero dependencies · Shadow DOM · 4 themes (light/dark/sepia/auto) · Widget docs
MIT — see LICENSE.
Built with care by FYIPedia.