
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
unitfyi-embed
Advanced tools
Embed UnitFYI widgets — unit converter, conversion cards, glossary terms. 220 units across 20 categories. Zero dependencies, Shadow DOM, 4 themes.
Embed UnitFYI widgets — units, 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 UnitFYI database.
Every widget includes a "Powered by UnitFYI" backlink directing readers to the full reference.
Try the interactive widget builder at widget.unitfyi.com
<!-- Place widget div where you want it to appear -->
<div data-unitfyi="entity" data-slug="units" data-theme="light"></div>
<!-- Load the embed script once, anywhere on the page -->
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
That's it. The widget fetches data from the UnitFYI API and renders with full style isolation.
| Type | Usage | Description |
|---|---|---|
entity | <div data-unitfyi="entity" data-slug="..."></div> | Entity detail card — unit, city, holiday, or name |
glossary | <div data-unitfyi="glossary" data-slug="..."></div> | Glossary term definition with cross-references |
guide | <div data-unitfyi="guide" data-slug="..."></div> | Guide summary card with key takeaways |
search | <div data-unitfyi="search" data-slug="..."></div> | Search box linking to the full database |
compare | <div data-unitfyi="compare" data-slug="..."></div> | Side-by-side entity comparison |
faq | <div data-unitfyi="faq" data-slug="..."></div> | FAQ accordion with expand/collapse |
converter | <div data-unitfyi="converter" data-slug="..."></div> | Interactive unit converter — fully offline, 220+ units |
conversion | <div data-unitfyi="conversion" data-slug="..."></div> | Inline conversion result pill (e.g. "1 km = 0.621 mi") |
| Attribute | Values | Default | Description |
|---|---|---|---|
data-unitfyi | entity, compare, glossary, guide, search, faq, [tools] | required | Widget type |
data-slug | e.g. "units" | — | Entity slug from the UnitFYI 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 Units..." | Search box placeholder |
<!-- Light (default) -->
<div data-unitfyi="entity" data-slug="units" data-theme="light"></div>
<!-- Dark -->
<div data-unitfyi="entity" data-slug="units" data-theme="dark"></div>
<!-- Sepia -->
<div data-unitfyi="entity" data-slug="units" data-theme="sepia"></div>
<!-- Auto — follows OS dark/light preference -->
<div data-unitfyi="entity" data-slug="units" data-theme="auto"></div>
<!-- Modern (default) — clean lines, rounded corners, accent gradients -->
<div data-unitfyi="entity" data-slug="units" data-style="modern"></div>
<!-- Clean — minimal borders, utility-focused, data-first aesthetic -->
<div data-unitfyi="entity" data-slug="units" data-style="clean"></div>
As an alternative to data-* attributes, you can use native HTML custom elements:
<!-- Custom element form -->
<unitfyi-entity slug="units" theme="light"></unitfyi-entity>
<unitfyi-compare slugs="units,other-slug"></unitfyi-compare>
<unitfyi-search placeholder="Search Units..."></unitfyi-search>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
Use style-variant (not style) to avoid conflicts with the HTML reserved style attribute.
<div data-unitfyi="entity" data-slug="units" data-theme="light"></div>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
<div data-unitfyi="compare" data-slugs="units,other-slug"></div>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
<div data-unitfyi="search" data-placeholder="Search Units..."></div>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
<div data-unitfyi="glossary" data-slug="example-term" data-theme="light"></div>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1/dist/embed.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/unitfyi-embed@1.0.0/dist/embed.min.js"></script>
npm install unitfyi-embed
import 'unitfyi-embed';
Visit unitfyi.com — UnitFYI is a comprehensive units reference with interactive tools, guides, and developer resources.
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 |
MIT — see LICENSE.
Built with care by FYIPedia.
FAQs
Embed UnitFYI widgets — unit converter, conversion cards, glossary terms. 220 units across 20 categories. Zero dependencies, Shadow DOM, 4 themes.
We found that unitfyi-embed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.