-
-
Free crypto price widgets for any website: price card, coin list, ticker and converter, with one script tag
-
Lightweight, private crypto widgets: no dependencies, no cookies, runs under a strict CSP, shown in dark theme
-
Customise the crypto widgets with CSS custom properties: light, dark or your own colours and font
-
Open-source (MIT) crypto price widgets on GitHub: coinfenla/coinfenla-widget
Inspiration
Crypto never sleeps — but developers shouldn't have to wrestle with paid APIs, heavyweight SDKs, or privacy-hostile embeds just to show a live price on their site.
Every existing solution came with strings attached: API keys to manage, cookie banners to worry about, or third-party scripts that slowed pages down and tracked visitors without consent. I set out to build the opposite — a zero-friction, privacy-first widget library that any developer can drop into a page in under 30 seconds.
The result is the open-source coinfenla-widget repository and its visual widget builder.
What it does
Free, open-source (MIT) crypto widgets for any website. One script tag, one custom element — that's it. No API key, no sign-up, no cookies.
<script type="module"
src="https://cdn.coinfenla.com/widgets/1/coinfenla-widget.js"
crossorigin="anonymous"></script>
<coinfenla-price coin="bitcoin" chart="7d">
<a href="https://www.coinfenla.com/price/bitcoin">CoinFenla</a>
</coinfenla-price>
Widget types
| Widget | Description |
|---|---|
| Price Card | Live price + 24 h change with an optional 7-day sparkline |
| List | Top coins by market cap — or a hand-picked set — as rows or a headline strip |
| Ticker | Scrolling marquee that pauses on hover and respects prefers-reduced-motion |
| Converter | Two-way calculator between any coin and major fiat currencies |
| Themes | Auto light/dark via prefers-color-scheme, or blend into any custom background |
Configure any widget visually with the widget builder, copy the snippet, and paste it into your HTML. The code is MIT-licensed — fork it, restyle it, ship it. Prices are sourced from CoinFenla, which cross-checks them across major exchanges for accuracy.
How I built it
- Native Web Components — A single, dependency-free ES module registers every
<coinfenla-…>custom element. No framework required, no build step on the consumer's side. - Flexible hosting — Load from
cdn.coinfenla.com, the jsDelivr mirror, or self-host. Pinned versions ship with Subresource Integrity (SRI) hashes for extra security. - CSP-safe by design — All styles are injected via Constructed Stylesheets, so the widgets run cleanly under a strict Content Security Policy — no
'unsafe-inline'needed. - Graceful degradation — Every widget wraps a plain
<a>fallback link that's visible when JavaScript is disabled or the browser doesn't support custom elements.
Challenges I ran into
The core challenge was displaying fast-moving financial data that stays readable without degrading the host page's performance. That meant solving several sub-problems at once:
- Responsive layouts that look right from 280 px mobile to full-width desktop
- Seamless light and dark theme switching without a flash of wrong colours
- Honouring
prefers-reduced-motionso the ticker doesn't animate for users who've opted out - A meaningful fallback when JavaScript is turned off entirely
- Strict zero-cookie, zero-tracking architecture — no analytics, no fingerprinting, nothing
Accomplishments that I'm proud of
- Truly open-source — coinfenla-widget is MIT-licensed and works out of the box with zero registration.
- Privacy by default — No cookies, no tracking pixels, no third-party analytics. Site owners have nothing to disclose and nothing to maintain.
- Production-grade security — Runs under the strictest CSP headers and degrades gracefully on pages without JavaScript.
- Developer experience — From the visual builder to copy-paste snippets to fully documented source code, getting started takes seconds.
What I learned
Real-time financial data has to be accurate and calm — numbers that jump around or render late erode trust instantly. The best way to make data useful to the broader web is to let developers preview, customise, and copy a working snippet in seconds — or read the source code — without gatekeeping behind sign-ups or pricing tiers.
What's next for CoinFenla Widget
- Additional widget layouts (mini chart, portfolio tracker, news feed)
- First-class React / Vue / Svelte wrapper packages
- Community contributions and forks via GitHub
- Enhanced accessibility (ARIA live regions, high-contrast mode)
- Embeddable dashboard builder for power users
Built With
- bitcoin
- blockchain
- cryptocurrency
- css
- es-modules
- ethereum
- fintech
- html5
- javascript
- open-source
- privacy
- real-time-data
- typescript
- web-components
- widget