30 CSS Badges11 / 30

Pure CSSMIT licensed

Search Intent Spectrum

Plots a keyword on the Informational / Navigational / Commercial / Transactional spectrum. Intent mismatch is one of the top reasons pages don't rank — this badge surfaces the right page type before a word is written.

Published

Live Demo
Try it

The code

<div class="bdg-11-stage">
  <div class="bdg-11-card">
    <div class="bdg-11-query-label">Keyword</div>
    <div class="bdg-11-query-text">"best seo tools 2026"</div>

    <div class="bdg-11-spectrum-wrap">
      <div class="bdg-11-spectrum">
        <div class="bdg-11-zone bdg-11-i">I</div>
        <div class="bdg-11-zone bdg-11-n">N</div>
        <div class="bdg-11-zone bdg-11-c">C</div>
        <div class="bdg-11-zone bdg-11-t">T</div>
      </div>
      <div class="bdg-11-marker"></div>
    </div>
    <div class="bdg-11-zone-labels">
      <span>Informational</span>
      <span>Navigational</span>
      <span>Commercial</span>
      <span>Transactional</span>
    </div>

    <div class="bdg-11-result-row">
      <div class="bdg-11-type-pill">Commercial</div>
      <div class="bdg-11-page-rec">
        <strong>Comparison / Listicle</strong>
        Best-of, tools roundup, pricing page
      </div>
    </div>
  </div>
</div>
.bdg-11-stage {
  background: #f0f4fb;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
}

.bdg-11-card {
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: 6px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.bdg-11-query-label {
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.bdg-11-query-text {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 16px;
  color: #1a1612;
  margin-bottom: 22px;
  padding: 8px 12px;
  background: #f6f8fc;
  border-radius: 4px;
  border-left: 3px solid #4285f4;
}

.bdg-11-spectrum-wrap {
  position: relative;
  margin-bottom: 8px;
}

.bdg-11-spectrum {
  display: flex;
  height: 44px;
  border-radius: 4px;
  overflow: visible;
  position: relative;
}

.bdg-11-zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
}

.bdg-11-zone:first-child {
  border-radius: 4px 0 0 4px;
}

.bdg-11-zone:last-child {
  border-radius: 0 4px 4px 0;
}

.bdg-11-i {
  background: #4285f4;
}

.bdg-11-n {
  background: #0f9d58;
}

.bdg-11-c {
  background: #f4b400;
  color: rgba(0,0,0,0.6);
}

.bdg-11-t {
  background: #db4437;
}

.bdg-11-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 4px;
  background: #1a1612;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #1a1612;
  animation: bdg-11-slide 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
  left: 0%;
}

@keyframes bdg-11-slide {
  to {
    left: 68%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bdg-11-marker {
    animation: none;
    left: 68%;
  }
}

.bdg-11-zone-labels {
  display: flex;
  margin-top: 6px;
  margin-bottom: 20px;
}

.bdg-11-zone-labels span {
  flex: 1;
  text-align: center;
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
}

.bdg-11-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid #eee;
}

.bdg-11-type-pill {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(244, 180, 0, 0.15);
  border: 1px solid rgba(244, 180, 0, 0.4);
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c48a00;
}

.bdg-11-page-rec {
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 11px;
  color: #888;
  text-align: right;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.bdg-11-page-rec strong {
  color: #1a1612;
  display: block;
}
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS Badge from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Search Intent Spectrum
Source: https://codefronts.com/snippets/css-badges/search-intent-spectrum/

Plots a keyword on the Informational / Navigational / Commercial / Transactional spectrum. Intent mismatch is one of the top reasons pages don't rank — this badge surfaces the right page type before a word is written.
## HTML
```html
<div class="bdg-11-stage">
  <div class="bdg-11-card">
    <div class="bdg-11-query-label">Keyword</div>
    <div class="bdg-11-query-text">"best seo tools 2026"</div>

    <div class="bdg-11-spectrum-wrap">
      <div class="bdg-11-spectrum">
        <div class="bdg-11-zone bdg-11-i">I</div>
        <div class="bdg-11-zone bdg-11-n">N</div>
        <div class="bdg-11-zone bdg-11-c">C</div>
        <div class="bdg-11-zone bdg-11-t">T</div>
      </div>
      <div class="bdg-11-marker"></div>
    </div>
    <div class="bdg-11-zone-labels">
      <span>Informational</span>
      <span>Navigational</span>
      <span>Commercial</span>
      <span>Transactional</span>
    </div>

    <div class="bdg-11-result-row">
      <div class="bdg-11-type-pill">Commercial</div>
      <div class="bdg-11-page-rec">
        <strong>Comparison / Listicle</strong>
        Best-of, tools roundup, pricing page
      </div>
    </div>
  </div>
</div>
```
## CSS
```css
.bdg-11-stage {
  background: #f0f4fb;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
}

.bdg-11-card {
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: 6px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.bdg-11-query-label {
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.bdg-11-query-text {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 16px;
  color: #1a1612;
  margin-bottom: 22px;
  padding: 8px 12px;
  background: #f6f8fc;
  border-radius: 4px;
  border-left: 3px solid #4285f4;
}

.bdg-11-spectrum-wrap {
  position: relative;
  margin-bottom: 8px;
}

.bdg-11-spectrum {
  display: flex;
  height: 44px;
  border-radius: 4px;
  overflow: visible;
  position: relative;
}

.bdg-11-zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
}

.bdg-11-zone:first-child {
  border-radius: 4px 0 0 4px;
}

.bdg-11-zone:last-child {
  border-radius: 0 4px 4px 0;
}

.bdg-11-i {
  background: #4285f4;
}

.bdg-11-n {
  background: #0f9d58;
}

.bdg-11-c {
  background: #f4b400;
  color: rgba(0,0,0,0.6);
}

.bdg-11-t {
  background: #db4437;
}

.bdg-11-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 4px;
  background: #1a1612;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #1a1612;
  animation: bdg-11-slide 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
  left: 0%;
}

@keyframes bdg-11-slide {
  to {
    left: 68%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bdg-11-marker {
    animation: none;
    left: 68%;
  }
}

.bdg-11-zone-labels {
  display: flex;
  margin-top: 6px;
  margin-bottom: 20px;
}

.bdg-11-zone-labels span {
  flex: 1;
  text-align: center;
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
}

.bdg-11-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid #eee;
}

.bdg-11-type-pill {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(244, 180, 0, 0.15);
  border: 1px solid rgba(244, 180, 0, 0.4);
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c48a00;
}

.bdg-11-page-rec {
  font-family: system-ui, "Bricolage Grotesque", sans-serif;
  font-size: 11px;
  color: #888;
  text-align: right;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.bdg-11-page-rec strong {
  color: #1a1612;
  display: block;
}
```

How this works

A horizontal spectrum showing where a query sits on the search-intent scale: Informational — Navigational — Commercial — Transactional. A small marker (dot / triangle / bar) sits at the query's position, with the classification label above. The pattern Ahrefs, Semrush, Clearscope, and Frase use to display keyword intent.

Pure CSS. The spectrum is a gradient bar; the marker uses left:calc(var(--position) * 100%) to position based on a custom property. Zero JavaScript for the display state.

Make it yours

  • Change the four intent zones and their colours via CSS variables on the wrapper.
  • Adjust marker style — dot, triangle, vertical bar, arrow — via ::before pseudo-element shape.
  • Add tick marks at each zone boundary for a more measurement-tool feel.
  • Show the numeric intent score (0-100) below the marker.
  • Support other classification systems (Awareness / Consideration / Decision / Retention for lifecycle stages).

Gotchas — read before shipping

  • Search intent classification is inherently fuzzy — the same query can serve multiple intents depending on context. The badge should acknowledge this with tooltip text or documentation.
  • The gradient's colour progression matters — use a hue journey that reads as smooth (blue → purple → magenta → red for cool → warm), not clashing.
  • For international queries, intent varies by market — &ldquo;buy shoes&rdquo; is transactional in US/EU/AU but may be informational in emerging markets. Localise the classification.
  • Pair with a tooltip on hover showing the confidence score if this is a ML-predicted classification.

Browser support

ChromeSafariFirefoxEdge
45+9+16+45+

CSS custom properties, gradients, and absolute positioning are universally supported.

Techniques used in this demo

Search CodeFronts

Loading…