Ocean Bullet Chart
Stephen Few's replacement for the gauge — a measure bar over banded qualitative ranges with a target tick, carrying in one row what a dial needs a whole tile for.
- lines of CSS
- 54lines of CSS
- dependencies
- 0dependencies
- browser, for years
- Everybrowser, for years
- motion only on interaction
- Hovermotion only on interaction
Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.
.fx-v10-chart-bullet-ocean-14022 {
display: grid;
gap: 0.6rem;
width: 244px;
padding: 0.75rem 0.7rem;
border-radius: 0.55rem;
background: #0b1120;
border: 1px solid #1e293b;
}
.fx-v10-chart-bullet-ocean-14022 .rw { display: grid; gap: 0.25rem; }
.fx-v10-chart-bullet-ocean-14022 em {
font-style: normal;
font-size: 0.65rem;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #64748b;
}
.fx-v10-chart-bullet-ocean-14022 .tk {
position: relative;
height: 20px;
}
.fx-v10-chart-bullet-ocean-14022 .bd {
position: absolute;
top: 0;
bottom: 0;
left: 0;
border-radius: 2px;
}
.fx-v10-chart-bullet-ocean-14022 .b1 { width: 100%; background: #131f38; }
.fx-v10-chart-bullet-ocean-14022 .b2 { width: 72%; background: #1c2b47; }
.fx-v10-chart-bullet-ocean-14022 .b3 { width: 44%; background: #24365a; }
.fx-v10-chart-bullet-ocean-14022 .ms {
position: absolute;
left: 0;
top: 6px;
height: 8px;
border-radius: 2px;
background: linear-gradient(90deg, #0ea5e9, #6366f1);
box-shadow: 0 0 10px rgba(14,165,233, 0.4);
animation: fx-v10-chart-bullet-ocean-14022-m1 1.1s cubic-bezier(0.4, 0, 0.2, 1) 1 both;
}
@keyframes fx-v10-chart-bullet-ocean-14022-m1 { from { width: 0; } to { width: 82%; } }
.fx-v10-chart-bullet-ocean-14022 .ms.s2 { animation-name: fx-v10-chart-bullet-ocean-14022-m2; animation-delay: 0.12s; }
@keyframes fx-v10-chart-bullet-ocean-14022-m2 { from { width: 0; } to { width: 57%; } }
.fx-v10-chart-bullet-ocean-14022 .tg {
position: absolute;
left: 88%;
top: 1px;
bottom: 1px;
width: 2.5px;
border-radius: 1px;
background: #f8fafc;
}
.fx-v10-chart-bullet-ocean-14022 .tg.t2 { left: 70%; }<div class="fx-v10-chart-bullet-ocean-14022">
<div class="rw">
<em>Revenue</em>
<div class="tk">
<i class="bd b1"></i>
<i class="bd b2"></i>
<i class="bd b3"></i>
<i class="ms"></i>
<i class="tg"></i>
</div>
</div>
<div class="rw">
<em>Signups</em>
<div class="tk">
<i class="bd b1"></i>
<i class="bd b2"></i>
<i class="bd b3"></i>
<i class="ms s2"></i>
<i class="tg t2"></i>
</div>
</div>
</div>What do I do with this?
- Put
ocean-bullet-chart-14023.cssanywhere your page already loads CSS from — in Next.js that isapp/globals.css, or any stylesheet with a<link>in your HTML. - Then put the class on the element you want it on:
<button class="fx-v10-chart-bullet-ocean-14022">. The CSS does nothing until a class name in it matches something on the page.
- Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add ocean-bullet-chart-14023What's included
- The markup and the stylesheet, in whichever framework you pick
- No runtime dependencies
Works with
- React
- Vue
- Svelte
- Tailwind
- styled-components
- Plain CSS
npx hoverlab add ocean-bullet-chart-14023
Or over MCP, from your editor's agent — no account needed.
License
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Motion safety
Static estimate, read from the CSS
- Reduced motion
- Brief motion, no guard
Animates briefly or on interaction. Only looping motion gets a guard in this catalog; copy the one from the Insights tab if this ships on a critical path.
- What it animates
- Reflows
Animates
width. The browser re-lays-out the page on every frame; prefertransformif you can. - Flashing (WCAG 2.3.1)
- No flashing found
No repeating change in opacity, colour or brightness large enough to count as a flash.
- Layout shift (CLS)
- May shift layout
Animates
widthon a box in flow, so content beside or after it can move. A category from the CSS, not a measurement for this effect.
Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed
35 more effects in Charts & Data
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse Charts & DataShipping one commercially
Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
- A commercial licence for everything in the catalog
- Unlimited bundle exports, in Vue, Svelte and Tailwind
- One payment — no subscription, nothing to renew
7 variations of Ocean Bullet Chart
Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.