GemFYI Embed
Zero Dependencies · Shadow DOM · 4 Themes

Embed Gems
on Any Website

Add GemFYI entity cards, comparison tables, glossary terms, interactive tools, and inline elements to any website with a single line of HTML. No build tools. No dependencies. Live data from the GemFYI database.

HTML
<!-- 1. Place the widget div -->
<div data-gemfyi="entity" data-slug="gems"></div>

<!-- 2. Add the script once -->
<script src="https://cdn.jsdelivr.net/npm/gemfyi-embed@1/dist/embed.min.js"></script>

Entity Card Preview

Gems Live Data
TypeEntity Detail
StyleModern
ThemeLight
DataLive API

Quick Start

Two lines of HTML. That's all it takes.

HTML
<!-- Step 1: Place widget divs anywhere on your page -->
<div data-gemfyi="entity" data-slug="gems" data-theme="light"></div>
<div data-gemfyi="compare" data-slugs="item-a,item-b"></div>
<div data-gemfyi="search" data-placeholder="Search Gems..."></div>

<!-- Step 2: Load the embed script once, anywhere -->
<script src="https://cdn.jsdelivr.net/npm/gemfyi-embed@1/dist/embed.min.js"></script>
Shadow DOM Isolation
No CSS conflicts with your site.
Zero Dependencies
No jQuery, React. Tree-shaken per site.
Live Science Data
From GemFYI's curated database.

Widget Types × 2 Styles × 3 Themes

Select a widget type to preview. Every widget includes Shadow DOM isolation and a "Powered by GemFYI" backlink.

Modern

Widget preview loads from live API

Technical

Widget preview loads from live API

Widget Options

Configure widgets with data-* attributes.

Attribute Values Default Description
data-gemfyientity, compare, glossary, guide, search, [tools]requiredWidget type to render
data-slugany slugEntity slug from the GemFYI database
data-themelight, dark, sepia, autolightVisual theme (auto follows OS preference)
data-stylemodern, technicalmodernWidget design style
data-sizedefault, compact, largedefaultWidget size
data-slugsslug-a,slug-bComma-separated slugs for compare widget
data-placeholderany stringSearch...Search box placeholder text

Styles & Themes

2 design styles × 4 themes. Mix and match to fit your site.

modern

Clean lines, rounded corners, accent gradients. Ideal for product pages and marketing sites. Default style.

data-style="modern"
technical

Monospace typography, grid overlays, laboratory aesthetic. Ideal for scientific documentation and research papers.

data-style="technical"
Light + Dark + Auto

Set explicitly or use auto to follow the visitor's OS preference (prefers-color-scheme).

data-theme="auto"
Sepia

Warm paper-tone background. Perfect for science blogs, journal articles, and educational content.

data-theme="sepia"

CDN Options

Multiple delivery options to fit your workflow.

jsDelivr CDN

Global CDN, auto-updates with npm. Recommended for most use cases.

HTML
<script src="https://cdn.jsdelivr.net/npm/gemfyi-embed@1/dist/embed.min.js"></script>

npm Package

For Webpack, Vite, Rollup bundlers.

Shell
npm install gemfyi-embed

// In your JS/TS:
import 'gemfyi-embed';

Pinned Version

Lock to a specific version for production stability.

HTML
<script src="https://cdn.jsdelivr.net/npm/gemfyi-embed@1.0.0/dist/embed.min.js"></script>

Science FYI Family

Part of FYIPedia — open-source developer tools for chemistry, geology, astronomy, and materials science. Hub: labfyi.com.

SiteDomainPackage
ChemFYIchemfyi.comnpm
AlloyFYIalloyfyi.comnpm
GemFYIgemfyi.comnpm
StarFYIstarfyi.comnpm
MineralFYImineralfyi.comnpm