DrugFYI Widget
Health FYI Embed · Zero Dependencies

Embed DrugFYI widgets anywhere

Add DrugFYI Drugs cards, medical glossary terms, drug guides, interactive health calculators, and inline badges to any website — one script tag.

Zero dependencies Shadow DOM isolation Medical disclaimer included 4 themes · 2 styles
Sample Drugs Medical

Evidence-based health information with clinical references and safety data.

Category
General Health
Source
PubMed Verified
⚕️ For educational purposes only. Consult a healthcare provider.
Educational use only · bodyfyi.com View on DrugFYI ↗
Drugs

Quick Start

One script tag. Drugs embedded in 30 seconds.

1

Add the script

Include the embed script from jsDelivr CDN anywhere in your HTML.

2

Place the element

Add a div with the data-drugfyi attribute.

3

Done

The widget renders automatically — fully isolated by Shadow DOM, disclaimer included.

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

<!-- Step 2: Place the widget -->
<div data-drugfyi="entity"
     data-slug="example-drugs"
     data-style="modern"
     data-theme="auto"></div>

Widget Options

Attribute Values Default Description
data-drugfyi entity · glossary · guide · search · compare · faq required Widget type to render
data-slug string required Entity slug from drugfyi.com
data-style clinical · modern clinical Visual style variant
data-theme light · dark · sepia · auto auto Color theme (auto follows OS preference)
data-lang en · es · fr · de · ja … en Display language
data-no-snippet true false Disable rich snippet injection into host page

Styles & Themes

2 styles × 4 themes = 8 combinations. All CSS-isolated via Shadow DOM.

Light
Clean white background
data-theme="light"
Dark
Deep dark background
data-theme="dark"
Sepia
Warm reading tone
data-theme="sepia"
Auto
Follows OS preference
data-theme="auto"
HTML
<!-- Clinical style + sepia theme -->
<div data-drugfyi="entity"
     data-slug="example-drugs"
     data-style="clinical"
     data-theme="sepia"></div>

CDN Options

Multiple delivery options for every use case.

Recommended
jsDelivr

Global CDN with automatic version resolution. Zero config.

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

Install via npm and import in your build pipeline.

Shell
npm install drugfyi-embed

// In your JS/TS:
import 'drugfyi-embed';
Self-hosted (R2)

Download and host on your own CDN for full control.

HTML
<script src="/assets/drugfyi-embed.min.js"></script>

Health FYI Family

Part of the FYIPedia open-source developer tools ecosystem. Hub: bodyfyi.com

FYIPedia Developer Tools

Embed widgets across 11 knowledge families

Family Sites Widget Package
Health FYI AnatomyFYI · PillFYI · DrugFYI · NutriFYI drugfyi-embed
Creative FYI ColorFYI · FontFYI · EmojiFYI · SymbolFYI · UnicodeFYI colorfyi-embed …
Nature FYI SpeciesFYI · BirdFYI · FishFYI · PlantFYI · DinoFYI speciesfyi-embed …
Science FYI ChemFYI · AlloyFYI · GemFYI · StarFYI · MineralFYI chemfyi-embed …
Transport FYI AirportFYI · AirlineFYI · PlaneFYI · TrainFYI airportfyi-embed …
Geo FYI DistanceFYI · MountainFYI · QuakeFYI · ZipFYI distancefyi-embed …

Plus: Beverage FYI · Tag FYI · Network FYI · Utility FYI · Guide FYI — fyipedia.com/developers