Skip to content

Conic Spinning Border

A copy-paste borders & outlines component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Borders & OutlinesHTMLCSSany framework
Processing

Copy into your project

HTML
<div class="nuda-bdx-conic">
  <div class="nuda-bdx-conic__track"></div>
  <div class="nuda-bdx-conic__face">
    <svg class="nuda-bdx-conic__icon" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
      <circle cx="10" cy="10" r="3" fill="#e4ff54"/>
      <path d="M10 3v2M10 15v2M3 10h2M15 10h2M5.05 5.05l1.41 1.41M13.54 13.54l1.41 1.41M5.05 14.95l1.41-1.41M13.54 6.46l1.41-1.41"
            stroke="#e4ff54" stroke-width="1.5" stroke-linecap="round"/>
    </svg>
    <span class="nuda-bdx-conic__label">Processing</span>
  </div>
</div>
CSS
.nuda-bdx-conic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 80px;
}

.nuda-bdx-conic__track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: conic-gradient(from var(--nuda-bdx-cs-angle,0deg),#e4ff54 0deg,#e4ff54 60deg,transparent 60deg,transparent 360deg);
  animation: _nuda-bdxConicSpin 1.6s linear infinite;
  mask: radial-gradient(farthest-side,transparent calc(100% - 3px),#fff calc(100% - 3px));
}

.nuda-bdx-conic__face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #1a1a1a;
  border-radius: 10px;
  inset: 3px;
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nuda-bdx-conic__icon {
  width: 20px;
  height: 20px;
}

.nuda-bdx-conic__label {
  color: #cfcfcf;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

@property --nuda-bdx-cs-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes _nuda-bdxConicSpin {
  to {
    --nuda-bdx-cs-angle: 360deg;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-bdx-conic__track {
    animation: none;
    background: conic-gradient(from 0deg,#e4ff54 0deg,#e4ff54 60deg,transparent 60deg,transparent 360deg);
  }
}

How to use Conic Spinning Border

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 borders & outlines components

← Browse all NudaUI components