kitbash Sign in Connect agent
Components

Earned-coins ticker

A ruled band of big italic lines, 'Name earned N coins', the numbers in pink and four-point stars between, rolling left without end.

Part of the style

Spinning Coin Night

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=Fraunces:ital,opsz,wght@1,9..144,400..600&display=swap");
:root {
  --night: #e9e9e9;
  --ink: #363736;
  --ink-dim: rgba(54, 55, 54, 0.5);
  --paper: #363736;
  --paper-ink: #e9e9e9;
  --chip: #bdbdbd;
  --chip-hover: #afafae;
  --rule: rgba(54, 55, 54, 0.14);
  --shade: rgba(233, 233, 233, 0.25);
  --blush: #04735f;
  --blush-deep: #01715d;
  --gold: #04735f;
  --gold-deep: #6eb29f;
  --gold-light: #6aac9a;
  --gold-glow: rgba(42, 155, 130, 0.35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}
</style>

<section class="ticker" aria-label="Recent earnings">
  <div class="ticker__track">
    <span class="ticker__item">Mabel earned <b>1,000 coins</b></span>
    <span class="ticker__item">Otis earned <b>240 coins</b></span>
    <span class="ticker__item">June earned <b>399 coins</b></span>
    <span class="ticker__item">Rafi earned <b>75 coins</b></span>
    <span class="ticker__item">Noor earned <b>1,250 coins</b></span>
  </div>
</section>

<style>
  .ticker {
    overflow: hidden;
    padding: var(--space-l) 0;
    border-block: var(--line) solid var(--rule);
    background: var(--night);
    color: var(--ink);
  }
  .ticker__track {
    display: flex;
    width: max-content;
    animation: ticker-roll 32s linear infinite;
  }
  .ticker:hover .ticker__track { animation-play-state: paused; }
  .ticker__item {
    display: inline-flex;
    align-items: center;
    flex: none;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: var(--display-m);
    font-weight: 800;
    font-style: italic;
    font-variation-settings: "wdth" 112;
    letter-spacing: var(--track-display);
    line-height: 1.1;
  }
  .ticker__item b {
    margin-left: 0.25em;
    color: var(--blush);
    font-weight: 900;
  }
  /* The four-point star between entries. */
  .ticker__item::after {
    content: "";
    width: 0.62em;
    height: 0.62em;
    margin: 0 0.7em;
    background: var(--ink);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  }
  @keyframes ticker-roll { to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }
</style>

<script>
  (() => {
    for (const track of document.querySelectorAll('.ticker__track')) {
      for (const item of [...track.children]) {
        const copy = item.cloneNode(true);
        copy.setAttribute('aria-hidden', 'true');
        track.append(copy);
      }
    }
  })();
</script>

Similar components

Emblem shelf ticker

Emblem shelf ticker

Wave ribbon

Wave ribbon

Activity band

Activity band

Reed ribbon

Reed ribbon

Pill arch

Pill arch

Blackletter news ticker

Blackletter news ticker

Drifting frames

Drifting frames

Ticker

Ticker