Skip to content

Next Episode Countdown

A copy-paste video player ui component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Video Player UIHTMLCSSany framework
Up next

S2 E4 — Signal Loss

Copy into your project

HTML
<!-- Next Episode Countdown — ring drains as autoplay approaches; Cancel stops it -->
<div class="nuda-vp2-next-ep">
  <div class="nuda-vp2-next-ep__thumb" aria-hidden="true"></div>
  <div class="nuda-vp2-next-ep__body">
    <span class="nuda-vp2-next-ep__eyebrow">Up next</span>
    <p class="nuda-vp2-next-ep__title">S2 E4 — Signal Loss</p>
    <div class="nuda-vp2-next-ep__actions">
      <button class="nuda-vp2-next-ep__cancel" type="button">Cancel</button>
      <button class="nuda-vp2-next-ep__play" type="button" aria-label="Play next episode now">
        <svg class="nuda-vp2-next-ep__ring" viewBox="0 0 36 36" aria-hidden="true">
          <circle class="nuda-vp2-next-ep__ring-track" cx="18" cy="18" r="15.5" fill="none" stroke-width="3" />
          <circle class="nuda-vp2-next-ep__ring-progress" cx="18" cy="18" r="15.5" fill="none" stroke-width="3" />
        </svg>
        <svg class="nuda-vp2-next-ep__icon" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5 L19 12 L8 19 Z" /></svg>
      </button>
    </div>
  </div>
</div>
CSS
.nuda-vp2-next-ep {
  display: flex;
  gap: 10px;
  width: 300px;
  padding: 10px;
  background: #161616;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
}

.nuda-vp2-next-ep__thumb {
  width: 96px;
  align-self: stretch;
  min-height: 74px;
  flex-shrink: 0;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%,rgba(228,255,84,.2),transparent 60%),linear-gradient(135deg,#2a2a32,#101013);
}

.nuda-vp2-next-ep__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.nuda-vp2-next-ep__eyebrow {
  font: 800 8px ui-sans-serif,system-ui,sans-serif;
  color: #e4ff54;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nuda-vp2-next-ep__title {
  margin: 0;
  font: 600 11px ui-sans-serif,system-ui,sans-serif;
  color: #fafafa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nuda-vp2-next-ep__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.nuda-vp2-next-ep__cancel {
  font: 600 9px ui-sans-serif,system-ui,sans-serif;
  color: #a1a1aa;
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  transition: color .2s ease,border-color .2s ease;
}

.nuda-vp2-next-ep__cancel:hover {
  color: #fafafa;
  border-color: rgba(255,255,255,.3);
}

.nuda-vp2-next-ep__cancel:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-vp2-next-ep__play {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #e4ff54;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.nuda-vp2-next-ep__play:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-vp2-next-ep__ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.nuda-vp2-next-ep__ring-track {
  stroke: rgba(255,255,255,.12);
}

.nuda-vp2-next-ep__ring-progress {
  stroke: #e4ff54;
  stroke-dasharray: 97.39;
  stroke-dashoffset: 0;
  animation: _nuda-vp2nextepring 8s linear forwards;
}

.nuda-vp2-next-ep__icon {
  width: 14px;
  height: 14px;
  margin-left: 1px;
  position: relative;
  z-index: 1;
}

@keyframes _nuda-vp2nextepring {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 97.39;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-vp2-next-ep__ring-progress {
    animation: none;
    stroke-dashoffset: 24;
  }
  .nuda-vp2-next-ep__cancel {
    transition: none;
  }
}

How to use Next Episode Countdown

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More video player ui components

← Browse all NudaUI components