Embed NameFYI widgets — names, glossary terms, interactive tools, and inline elements — on any website. 10 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 NameFYI database.
Every widget includes a "Powered by NameFYI" backlink directing readers to the full reference.
Try the interactive widget builder at widget.namefyi.com
<!-- Place widget div where you want it to appear -->
<div data-namefyi="entity" data-slug="names" data-theme="light"></div>
<!-- Load the embed script once, anywhere on the page -->
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script>That's it. The widget fetches data from the NameFYI API and renders with full style isolation.
| Type | Usage | Description |
|---|---|---|
entity |
<div data-namefyi="entity" data-slug="..."></div> |
Entity detail card — unit, city, holiday, or name |
glossary |
<div data-namefyi="glossary" data-slug="..."></div> |
Glossary term definition with cross-references |
guide |
<div data-namefyi="guide" data-slug="..."></div> |
Guide summary card with key takeaways |
search |
<div data-namefyi="search" data-slug="..."></div> |
Search box linking to the full database |
compare |
<div data-namefyi="compare" data-slug="..."></div> |
Side-by-side entity comparison |
faq |
<div data-namefyi="faq" data-slug="..."></div> |
FAQ accordion with expand/collapse |
random |
<div data-namefyi="random" data-slug="..."></div> |
Random name generator — filter by culture and gender |
character |
<div data-namefyi="character" data-slug="..."></div> |
Hanja character card with stroke order and meanings |
elements |
<div data-namefyi="elements" data-slug="..."></div> |
Inline Five Elements colored badges (Metal/Wood/Water/Fire/Earth) |
stroke |
<div data-namefyi="stroke" data-slug="..."></div> |
Inline stroke count pill for Hanja characters |
| Attribute | Values | Default | Description |
|---|---|---|---|
data-namefyi |
entity, compare, glossary, guide, search, faq, [tools] | required | Widget type |
data-slug |
e.g. "names" | — | Entity slug from the NameFYI database |
data-theme |
light, dark, sepia, auto | light | Visual theme (auto follows OS preference) |
data-style |
modern, clean | modern | Widget design style |
data-size |
default, compact, large | default | Widget size |
data-placeholder |
any string | "Search Names..." | Search box placeholder |
<!-- Light (default) -->
<div data-namefyi="entity" data-slug="names" data-theme="light"></div>
<!-- Dark -->
<div data-namefyi="entity" data-slug="names" data-theme="dark"></div>
<!-- Sepia -->
<div data-namefyi="entity" data-slug="names" data-theme="sepia"></div>
<!-- Auto — follows OS dark/light preference -->
<div data-namefyi="entity" data-slug="names" data-theme="auto"></div><!-- Modern (default) — clean lines, rounded corners, accent gradients -->
<div data-namefyi="entity" data-slug="names" data-style="modern"></div>
<!-- Clean — minimal borders, utility-focused, data-first aesthetic -->
<div data-namefyi="entity" data-slug="names" data-style="clean"></div>As an alternative to data-* attributes, you can use native HTML custom elements:
<!-- Custom element form -->
<namefyi-entity slug="names" theme="light"></namefyi-entity>
<namefyi-compare slugs="names,other-slug"></namefyi-compare>
<namefyi-search placeholder="Search Names..."></namefyi-search>
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script>Use style-variant (not style) to avoid conflicts with the HTML reserved style attribute.
<div data-namefyi="entity" data-slug="names" data-theme="light"></div>
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script><div data-namefyi="compare" data-slugs="names,other-slug"></div>
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script><div data-namefyi="search" data-placeholder="Search Names..."></div>
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script><div data-namefyi="glossary" data-slug="example-term" data-theme="light"></div>
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script><script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/embed.min.js"></script>npm install namefyi-embedimport 'namefyi-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: NameFYI 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 NameFYI
Visit namefyi.com — NameFYI is a comprehensive names reference with interactive tools, guides, and developer resources.
- API docs: namefyi.com/developers/
- Widget builder: widget.namefyi.com
- npm package: npmjs.com/package/namefyi-embed
- GitHub: github.com/fyipedia/namefyi-embed
Part of FYIPedia — open-source developer tools ecosystem. Utility FYI covers unit conversion, timezones, holidays, and names. Hub: toolfyi.com.
| Site | Domain | Focus | Package |
|---|---|---|---|
| UnitFYI | unitfyi.com | 220 units, 20 categories, offline converter | npm |
| TimeFYI | timefyi.com | 6,040 cities, live world clock, sunrise data | npm |
| HolidayFYI | holidayfyi.com | 626 holidays, 197 countries, live today feed | npm |
| NameFYI | namefyi.com | 35,585 names, Hanja characters, Five Elements | npm |
| 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 |
| timefyi | PyPI | npm | Timezone ops & business hours — timefyi.com |
| holidayfyi | PyPI | npm | Holiday dates & Easter calculation — holidayfyi.com |
| namefyi | PyPI | npm | Korean romanization & Five Elements — namefyi.com |
| fyipedia | PyPI | — | Unified CLI for all FYI tools — fyipedia.com |
Embed NameFYI widgets on any website with namefyi-embed:
<script src="https://cdn.jsdelivr.net/npm/namefyi-embed@1/dist/embed.min.js"></script>
<div data-namefyi="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.