Open demo

CSS code

HTML
<div class="tm">
  <div class="tm-win">
    <div class="tm-bar" aria-hidden="true"><span class="tm-dot tm-r"></span><span class="tm-dot tm-y"></span><span class="tm-dot tm-g"></span><span class="tm-title">auth@prod: ~/login</span></div>
    <div class="tm-body">
      <p class="tm-line">Last login: from <b>203.0.113.7</b></p>
      <p class="tm-line">Session requires authentication.</p>
      <h1><span aria-hidden="true">> </span>identify yourself<span class="tm-cursor" aria-hidden="true">▌</span></h1>
      <form action="#" method="post" onsubmit="event.preventDefault()">
        <label class="tm-label" for="tm-user"><span aria-hidden="true">$ </span>username</label>
        <input class="tm-input" type="text" id="tm-user" name="username" placeholder="ada" autocomplete="username" autocapitalize="none" spellcheck="false" required>
        <label class="tm-label" for="tm-password"><span aria-hidden="true">$ </span>password</label>
        <input class="tm-input" type="password" id="tm-password" name="password" autocomplete="current-password" required>
        <button class="tm-btn" type="submit">[ authenticate ]</button>
      </form>
      <p class="tm-hint"><span aria-hidden="true">// </span>lost credentials? <a href="#">run recovery</a></p>
    </div>
  </div>
</div>
CSS
/* Terminal login: a window chrome bar, monospace prompts and a blinking block cursor, all in phosphor green. */
.tm{--tm-green:#4ade80;--tm-bright:#bbf7d0;--tm-soft:#86efac;--tm-dim:#3f9b57;--tm-faint:#7a8d7a;--tm-line:#4f7552;
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:#0a0e0a;
  background-image:linear-gradient(rgba(74,222,128,.04) 1px,transparent 1px);background-size:100% 3px;color:var(--tm-green);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace}
.tm h1,.tm p{margin:0}
.tm-win{width:100%;max-width:460px;background:#0d130d;border:1px solid #1d2b1d;border-radius:12px;overflow:hidden;box-shadow:0 0 60px rgba(74,222,128,.12)}
.tm-bar{display:flex;align-items:center;gap:7px;background:#111a11;border-bottom:1px solid #1d2b1d;padding:11px 14px}
.tm-dot{width:11px;height:11px;border-radius:50%}
.tm-r{background:#f87171}.tm-y{background:#fbbf24}.tm-g{background:#34d399}
.tm-title{margin-left:8px;font-size:.75rem;color:var(--tm-faint);letter-spacing:.04em}
.tm-body{padding:26px 26px 32px}
.tm-line{font-size:.82rem;color:var(--tm-dim);margin-bottom:6px!important}
.tm-line b{color:var(--tm-soft);font-weight:400}
.tm h1{font-size:1rem;color:var(--tm-bright);font-weight:700;margin:14px 0 22px}
.tm-cursor{margin-left:2px;animation:tm-blink 1s steps(1) infinite}
@keyframes tm-blink{50%{opacity:0}}
.tm-label{display:block;font-size:.78rem;color:var(--tm-dim);margin-bottom:6px}
.tm-label span{color:var(--tm-soft)}
.tm-input{display:block;width:100%;padding:11px 13px;margin-bottom:18px;background:#0a0f0a;border:1px solid var(--tm-line);border-radius:8px;color:var(--tm-bright);
  font:inherit;font-size:.9rem;caret-color:var(--tm-green);transition:border-color .15s,box-shadow .15s}
.tm-input::placeholder{color:#6c806d}
.tm-input:focus{outline:none;border-color:var(--tm-green);box-shadow:0 0 0 3px rgba(74,222,128,.2)}
.tm-btn{width:100%;padding:12px;border:1px solid var(--tm-green);border-radius:8px;background:transparent;color:var(--tm-green);font:inherit;font-size:.9rem;
  font-weight:700;letter-spacing:.05em;cursor:pointer;transition:background-color .15s,color .15s}
.tm-btn:hover{background:var(--tm-green);color:#0a0e0a}
.tm-hint{margin-top:18px!important;font-size:.75rem;color:var(--tm-faint)}
.tm-hint a{color:var(--tm-soft);text-decoration:none;border-bottom:1px dashed var(--tm-dim)}
.tm a:focus-visible,.tm-btn:focus-visible{outline:2px solid var(--tm-green);outline-offset:3px;border-radius:3px}
.tm-btn:focus-visible{border-radius:8px}
@media (prefers-reduced-motion:reduce){.tm-cursor{animation:none}.tm-input,.tm-btn{transition:none}}

Bootstrap 5 code

Requires: Bootstrap 5.3.8 CSS

HTML
<div class="tm d-flex align-items-center justify-content-center">
  <div class="card w-100">
    <div class="card-header d-flex align-items-center gap-2" aria-hidden="true"><span class="tm-dot tm-r rounded-circle"></span><span class="tm-dot tm-y rounded-circle"></span><span class="tm-dot tm-g rounded-circle"></span><span class="tm-title">auth@prod: ~/login</span></div>
    <div class="card-body">
      <p class="tm-line">Last login: from <b>203.0.113.7</b></p>
      <p class="tm-line">Session requires authentication.</p>
      <h1><span aria-hidden="true">> </span>identify yourself<span class="tm-cursor" aria-hidden="true">▌</span></h1>
      <form action="#" method="post" onsubmit="event.preventDefault()">
        <label class="form-label d-block" for="tm-user"><span aria-hidden="true">$ </span>username</label>
        <input class="form-control" type="text" id="tm-user" name="username" placeholder="ada" autocomplete="username" autocapitalize="none" spellcheck="false" required>
        <label class="form-label d-block" for="tm-password"><span aria-hidden="true">$ </span>password</label>
        <input class="form-control" type="password" id="tm-password" name="password" autocomplete="current-password" required>
        <button class="btn btn-tm w-100" type="submit">[ authenticate ]</button>
      </form>
      <p class="tm-hint mb-0"><span aria-hidden="true">// </span>lost credentials? <a href="#">run recovery</a></p>
    </div>
  </div>
</div>
CSS
/* Bootstrap .card with a .card-header window bar, monospace .form-control fields and an outline .btn in phosphor green. */
.tm{--tm-green:#4ade80;--tm-bright:#bbf7d0;--tm-soft:#86efac;--tm-dim:#3f9b57;--tm-faint:#7a8d7a;
  --bs-font-monospace:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;--bs-border-color:#4f7552;
  min-height:100vh;padding:24px;background:#0a0e0a;background-image:linear-gradient(rgba(74,222,128,.04) 1px,transparent 1px);background-size:100% 3px;
  color:var(--tm-green);font-family:var(--bs-font-monospace);line-height:normal}
.tm .card{--bs-card-bg:#0d130d;--bs-card-border-color:#1d2b1d;--bs-card-border-radius:12px;--bs-card-cap-bg:#111a11;--bs-card-cap-padding-y:11px;
  --bs-card-cap-padding-x:14px;--bs-card-spacer-y:26px;--bs-card-spacer-x:26px;--bs-card-color:var(--tm-green);max-width:460px;overflow:hidden;
  box-shadow:0 0 60px rgba(74,222,128,.12)}
.tm .card-body{padding-bottom:32px}
.tm-dot{width:11px;height:11px}
.tm-r{background:#f87171}.tm-y{background:#fbbf24}.tm-g{background:#34d399}
.tm-title{margin-left:8px;font-size:.75rem;color:var(--tm-faint);letter-spacing:.04em}
.tm-line{font-size:.82rem;color:var(--tm-dim);margin-bottom:6px}
.tm-line b{color:var(--tm-soft);font-weight:400}
.tm h1{font-size:1rem;color:var(--tm-bright);font-weight:700;margin:14px 0 22px;line-height:normal}
.tm-cursor{margin-left:2px;animation:tm-blink 1s steps(1) infinite}
@keyframes tm-blink{50%{opacity:0}}
.tm .form-label{font-size:.78rem;color:var(--tm-dim);margin-bottom:6px}
.tm .form-label span{color:var(--tm-soft)}
.tm .form-control{padding:11px 13px;margin-bottom:18px;background:#0a0f0a;border-radius:8px;color:var(--tm-bright);font-family:inherit;font-size:.9rem;line-height:1.2;
  caret-color:var(--tm-green)}
.tm .form-control::placeholder{color:#6c806d}
.tm .form-control:focus{background:#0a0f0a;color:var(--tm-bright);border-color:var(--tm-green);box-shadow:0 0 0 3px rgba(74,222,128,.2)}
.tm .btn-tm{--bs-btn-color:var(--tm-green);--bs-btn-border-color:var(--tm-green);--bs-btn-hover-color:#0a0e0a;--bs-btn-hover-bg:var(--tm-green);
  --bs-btn-hover-border-color:var(--tm-green);--bs-btn-active-color:#0a0e0a;--bs-btn-active-bg:var(--tm-green);--bs-btn-active-border-color:var(--tm-green);
  --bs-btn-padding-y:12px;--bs-btn-font-family:inherit;--bs-btn-font-size:.9rem;--bs-btn-font-weight:700;--bs-btn-border-radius:8px;--bs-btn-line-height:1.2;
  --bs-btn-focus-box-shadow:none;letter-spacing:.05em}
.tm-hint{margin-top:18px;font-size:.75rem;color:var(--tm-faint)}
.tm-hint a{color:var(--tm-soft);text-decoration:none;border-bottom:1px dashed var(--tm-dim)}
.tm a:focus-visible,.tm .btn-tm:focus-visible{outline:2px solid var(--tm-green);outline-offset:3px;border-radius:3px}
.tm .btn-tm:focus-visible{border-radius:8px}
@media (prefers-reduced-motion:reduce){.tm-cursor{animation:none}.tm .form-control,.tm .btn{transition:none}}

Tailwind 4 code

Requires: Tailwind CSS 4

HTML
<div class="flex min-h-screen items-center justify-center bg-[#0a0e0a] bg-[linear-gradient(rgba(74,222,128,.04)_1px,transparent_1px)] bg-size-[100%_3px] p-6 font-mono leading-[normal] text-tm-green">
  <div class="w-full max-w-[460px] overflow-hidden rounded-xl border border-[#1d2b1d] bg-[#0d130d] shadow-[0_0_60px_rgba(74,222,128,.12)]">
    <div class="flex items-center gap-[7px] border-b border-[#1d2b1d] bg-[#111a11] px-3.5 py-[11px]" aria-hidden="true"><span class="size-[11px] rounded-full bg-[#f87171]"></span><span class="size-[11px] rounded-full bg-[#fbbf24]"></span><span class="size-[11px] rounded-full bg-[#34d399]"></span><span class="ml-2 text-xs tracking-[.04em] text-tm-faint">auth@prod: ~/login</span></div>
    <div class="px-[26px] pt-[26px] pb-8">
      <p class="mb-1.5 text-[.82rem] text-tm-dim">Last login: from <b class="font-normal text-tm-soft">203.0.113.7</b></p>
      <p class="mb-1.5 text-[.82rem] text-tm-dim">Session requires authentication.</p>
      <h1 class="mt-3.5 mb-[22px] text-base font-bold text-tm-bright"><span aria-hidden="true">> </span>identify yourself<span class="ml-0.5 motion-safe:animate-tm-blink" aria-hidden="true">▌</span></h1>
      <form action="#" method="post" onsubmit="event.preventDefault()">
        <label class="mb-1.5 block text-[.78rem] text-tm-dim" for="tm-user"><span class="text-tm-soft" aria-hidden="true">$ </span>username</label>
        <input class="mb-[18px] block w-full rounded-lg border border-tm-line bg-[#0a0f0a] px-[13px] py-[11px] text-[.9rem] text-tm-bright caret-tm-green transition-[border-color,box-shadow] duration-150 placeholder:text-[#6c806d] focus:border-tm-green focus:shadow-[0_0_0_3px_rgba(74,222,128,.2)] focus:outline-none motion-reduce:transition-none" type="text" id="tm-user" name="username" placeholder="ada" autocomplete="username" autocapitalize="none" spellcheck="false" required>
        <label class="mb-1.5 block text-[.78rem] text-tm-dim" for="tm-password"><span class="text-tm-soft" aria-hidden="true">$ </span>password</label>
        <input class="mb-[18px] block w-full rounded-lg border border-tm-line bg-[#0a0f0a] px-[13px] py-[11px] text-[.9rem] text-tm-bright caret-tm-green transition-[border-color,box-shadow] duration-150 placeholder:text-[#6c806d] focus:border-tm-green focus:shadow-[0_0_0_3px_rgba(74,222,128,.2)] focus:outline-none motion-reduce:transition-none" type="password" id="tm-password" name="password" autocomplete="current-password" required>
        <button class="w-full cursor-pointer rounded-lg border border-tm-green bg-transparent p-3 text-[.9rem] font-bold tracking-[.05em] transition-colors duration-150 hover:bg-tm-green hover:text-[#0a0e0a] focus-visible:outline-2 focus-visible:outline-offset-3 focus-visible:outline-tm-green motion-reduce:transition-none" type="submit">[ authenticate ]</button>
      </form>
      <p class="mt-[18px] text-xs text-tm-faint"><span aria-hidden="true">// </span>lost credentials? <a class="rounded-[3px] border-b border-dashed border-tm-dim text-tm-soft focus-visible:outline-2 focus-visible:outline-offset-3 focus-visible:outline-tm-green" href="#">run recovery</a></p>
    </div>
  </div>
</div>
CSS
@theme {
  --color-tm-green: #4ade80;
  --color-tm-bright: #bbf7d0;
  --color-tm-soft: #86efac;
  --color-tm-dim: #3f9b57;
  --color-tm-faint: #7a8d7a;
  --color-tm-line: #4f7552;
  --animate-tm-blink: tm-blink 1s steps(1) infinite;
  @keyframes tm-blink { 50% { opacity: 0; } }
}

About this set

A sign-in window styled like a command-line session. A title bar with red, amber and green dots reads auth@prod: ~/login; below it, green monospace lines show the last login address and a note that the session needs authentication, then a > identify yourself prompt with a blinking block cursor. The form asks for a username and password under $-prefixed labels and submits with an outlined [ authenticate ] button that fills green on hover. A faint scanline pattern runs across the page. Use it for developer tools, internal consoles, CTF sites or anything aimed at people who live in a terminal. The decorative characters (the prompt arrow, the dollar signs, the comment slashes and the cursor) are wrapped in aria-hidden spans, so screen readers read plain labels such as username. The dim grey text and placeholders were brightened to meet 4.5:1 on the dark background, field borders were raised to 3:1, and the cursor stops blinking under prefers-reduced-motion. The Bootstrap version uses .card with a .card-header title bar, .form-control and an outline .btn.

What’s included

  • Window chrome, monospace prompts and a blinking block cursor
  • Decorative prompt characters hidden from screen readers
  • Username field with autocomplete, autocapitalize and spellcheck off
  • Dim text brightened to WCAG AA on the dark background
  • Cursor blink disabled under prefers-reduced-motion

Accessibility

Labels are visible and read as plain words because the $ and > glyphs are aria-hidden, as is the window title bar. Inputs show a green border and ring on focus, and the button and link show a 2px green outline on keyboard focus. The blink animation and transitions stop under prefers-reduced-motion.

Customise it

Change --tm-green, --tm-bright, --tm-dim and --tm-line on .tm, or swap the font stack for your own monospace font. In Tailwind edit the --color-tm-* theme colours.