Skip to content

Terminal Cursor

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

Code & TerminalHTMLCSSany framework
$npm run dev

Copy into your project

HTML
<!-- Terminal Cursor — single line with prompt + blinking block cursor -->
<div class="nuda-term">
  <span class="nuda-term__prompt">$</span>
  <span class="nuda-term__cmd">npm run dev</span>
  <span class="nuda-term__cursor" aria-hidden="true"></span>
</div>
CSS
/* Terminal Cursor
   Classic block cursor blinking after a command line.
   Customize: --term-accent, --term-bg */

.nuda-term {
  --term-accent: #e4ff54;
  --term-bg: #0a0a0a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--term-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font: 500 0.875rem ui-monospace, monospace;
}

.nuda-term__prompt {
  color: var(--term-accent);
  font-weight: 700;
}

.nuda-term__cmd { color: #fafafa; }

.nuda-term__cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--term-accent);
  box-shadow: 0 0 4px rgba(228, 255, 84, 0.5);
  animation: nuda-term-blink 1s steps(2) infinite;
}

@keyframes nuda-term-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .nuda-term__cursor { animation: none; }
}

How to use Terminal Cursor

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 code & terminal components

← Browse all NudaUI components