Coin Chip Widget
Price chips you can drop into any sentence, row, grid or scrolling ticker.
Demo
Light / dark, variantsTheme
Layout
Integration
Include the script once per page. Use any method below — all render the same widget.
1
Inline chip
The fastest way in: add the script once, then place a chip anywhere in your markup. The price refreshes on its own.
HTML
<!-- 1. Include the script once per page -->
<script src="https://cdn.bubblenexus.com/widgets/v1/coin-widgets.js?v=1.4.1"></script>
<!-- 2. Drop a chip into any sentence or element -->
<p>
Bitcoin <span data-cw="btc"></span> is trading near its weekly high.
</p>2
Auto render
Add attributes to the script tag and it renders a widget right after itself — no wrapper element required.
HTML
<script
src="https://cdn.bubblenexus.com/widgets/v1/coin-widgets.js?v=1.4.1"
data-coins="btc,eth,sol,ada,xrp"
data-layout="row"
data-theme="light"
data-size="md"
></script>3
JavaScript API
Full control from JS — pick the target, layout, size and link behaviour programmatically. Call .refresh() to re-fetch prices.
HTML + JS
<div id="coin-chips"></div>
<script src="https://cdn.bubblenexus.com/widgets/v1/coin-widgets.js?v=1.4.1"></script>
<script>
ChipWidget.init({
target: "#coin-chips",
coins: ["btc", "eth", "sol"],
theme: "light",
layout: "grid",
cols: 3,
size: "md",
icon: true,
name: true,
change: true,
link: true
});
</script>Options
In markup use data-*attributes; in the JavaScript API drop the data- prefix.
| Attribute | Values | Default | Description |
|---|---|---|---|
data-cw | coin slug or symbol | — | Coin for an inline chip, e.g. btc, bitcoin or Bitcoin. Only used on inline spans. |
data-coins | comma-separated list | btc,eth | Coins to display. Accepts slugs, symbols or names: btc,ethereum, Solana. |
data-theme | light | dark | light | Colour palette used by the widget. |
data-layout | inline | row | grid | ticker | inline | inline sits inside text, row wraps horizontally, grid uses data-cols columns, ticker scrolls continuously. |
data-size | sm | md | lg | md | Chip font size and padding. |
data-cols | 1–6 | 3 | Column count — only used when data-layout is grid. |
data-icon | true | false | true | Show the coin logo. |
data-name | true | false | true | Show the full coin name under the symbol. |
data-change | true | false | true | Show the 24h change pill. |