Pure TailwindMIT licensed

Tailwind Neon Glow Input

Cyan neon for dark dashboards and developer tools: a translucent cyan border on near-black, and three layered shadows that bloom together on focus. The layered shadow is one arbitrary utility — exactly the case Tailwind is not trying to tokenise.

Live Demo
Plain CSSTailwind v4
Try it

Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time

Untitled UI React · Affiliate link

Get Untitled UI Pro

The code

<div class="tif-03 grid min-h-svh w-full place-items-center bg-tif03-bg px-6 py-14 font-tif03-mono" aria-label="Neon glow input demo">
  <label class="grid w-full max-w-70 gap-1.5">
    <span class="text-[10px] tracking-[0.18em] text-tif03-acc [text-shadow:0_0_8px_oklch(0.9_0.15_195/0.5)]">SECURE TOKEN</span>
    <input type="text" name="tif03-token" placeholder="sk_live_••••••••••••" required
      class="w-full rounded-md border border-tif03-acc/40 bg-tif03-field px-3.5 py-2.5 text-[13px] text-white outline-none transition-[border-color,box-shadow,background-color] duration-200 placeholder:text-tif03-acc/45 focus:border-tif03-acc focus:bg-tif03-field2 focus:shadow-[0_0_0_1px_var(--color-tif03-acc),0_0_16px_oklch(0.9_0.15_195/0.45),inset_0_0_12px_oklch(0.9_0.15_195/0.12)]">
  </label>
</div>
@import "tailwindcss";

@theme {
  --color-tif03-bg: #07070f;
  --color-tif03-bg: oklch(0.13 0.012 280);
  --color-tif03-field: #0a0a14;
  --color-tif03-field: oklch(0.15 0.014 280);
  --color-tif03-field2: #0d1820;
  --color-tif03-field2: oklch(0.21 0.03 220);
  --color-tif03-acc: #6cffff;
  --color-tif03-acc: oklch(0.9 0.15 195);
  --font-tif03-mono: 'JetBrains Mono', ui-monospace, monospace;
}

.tif-03 {
  width: 100%;
}

.tif-03 ::selection {
  background: var(--color-tif03-acc);
  color: #07070f;
}

Setup — do this once per project

Skip this if your project already runs Tailwind v4.

1Load Tailwind
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

Compiles in the browser — perfect for a CodePen or a quick test, not for production.

2Add the stylesheetRequiredthe @theme block is what makes the custom utilities exist
@import "tailwindcss";

@theme {
  --color-tif03-bg: #07070f;
  --color-tif03-bg: oklch(0.13 0.012 280);
  --color-tif03-field: #0a0a14;
  --color-tif03-field: oklch(0.15 0.014 280);
  --color-tif03-field2: #0d1820;
  --color-tif03-field2: oklch(0.21 0.03 220);
  --color-tif03-acc: #6cffff;
  --color-tif03-acc: oklch(0.9 0.15 195);
  --font-tif03-mono: 'JetBrains Mono', ui-monospace, monospace;
}

.tif-03 {
  width: 100%;
}

.tif-03 ::selection {
  background: var(--color-tif03-acc);
  color: #07070f;
}
3Fonts used by this demooptional — skip if you have your own type stack
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap">

What changed in the port

Which parts became utilities, which stayed CSS, and why.

  • The three-stop focus shadow stays arbitrary — correctly. The colour it is built from became a token, which is the part worth reusing.
  • ::placeholder as its own rule becomes the placeholder: variant, one class along from the text colour it echoes.
  • The label's text-shadow has no utility in v4, so it is an arbitrary property rather than a stylesheet rule — it stays on the element.
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS demo from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Tailwind Neon Glow Input
Source: https://codefronts.com/components/tailwind-css-input-fields/tailwind-neon-glow-input/

Cyan neon for dark dashboards and developer tools: a translucent cyan border on near-black, and three layered shadows that bloom together on focus. The layered shadow is one arbitrary utility — exactly the case Tailwind is not trying to tokenise.
## HTML
```html
<div class="tif-03 grid min-h-svh w-full place-items-center bg-tif03-bg px-6 py-14 font-tif03-mono" aria-label="Neon glow input demo">
  <label class="grid w-full max-w-70 gap-1.5">
    <span class="text-[10px] tracking-[0.18em] text-tif03-acc [text-shadow:0_0_8px_oklch(0.9_0.15_195/0.5)]">SECURE TOKEN</span>
    <input type="text" name="tif03-token" placeholder="sk_live_••••••••••••" required
      class="w-full rounded-md border border-tif03-acc/40 bg-tif03-field px-3.5 py-2.5 text-[13px] text-white outline-none transition-[border-color,box-shadow,background-color] duration-200 placeholder:text-tif03-acc/45 focus:border-tif03-acc focus:bg-tif03-field2 focus:shadow-[0_0_0_1px_var(--color-tif03-acc),0_0_16px_oklch(0.9_0.15_195/0.45),inset_0_0_12px_oklch(0.9_0.15_195/0.12)]">
  </label>
</div>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tif03-bg: #07070f;
  --color-tif03-bg: oklch(0.13 0.012 280);
  --color-tif03-field: #0a0a14;
  --color-tif03-field: oklch(0.15 0.014 280);
  --color-tif03-field2: #0d1820;
  --color-tif03-field2: oklch(0.21 0.03 220);
  --color-tif03-acc: #6cffff;
  --color-tif03-acc: oklch(0.9 0.15 195);
  --font-tif03-mono: 'JetBrains Mono', ui-monospace, monospace;
}

.tif-03 {
  width: 100%;
}

.tif-03 ::selection {
  background: var(--color-tif03-acc);
  color: #07070f;
}
```

How this works

The bloom is one declaration. A crisp 1px ring, a 16px halo and an inset tint fire on a single 200ms transition, so the state change reads as one event rather than three:

class="focus:shadow-[0_0_0_1px_var(--color-tif03-acc),0_0_16px_oklch(0.9_0.15_195/0.45),inset_0_0_12px_oklch(0.9_0.15_195/0.12)]"

Arbitrary is correct here. A three-stop composed shadow is not a design-scale value — there is no sensible shadow-neon to mint. What is tokenised is the colour it is built from, so retinting the whole demo is one @theme edit.

Make it yours

  • Hue: change --color-tif03-acc. Magenta, lime and amber all read well on the same near-black base.
  • Halo weight: the middle stop's 16px → 24px, or drop the alpha below 0.45.
  • Type: swap the --font-tif03-mono stack for Fira Code or IBM Plex Mono; nothing else changes.
  • Ground: darken --color-tif03-bg toward pure black if the field sits on a lighter surface.

Gotchas — read before shipping

  • The bloom washes out over anything lighter than roughly #1a1a2a. This pattern is dark-only and that is not a styling preference.
  • outline-none is only defensible because the glow is the focus indicator — never lower its intensity below clearly visible.
  • Large blurred shadows repaint on every keystroke; on low-end Android a form with many of these will feel sticky.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

Layered box-shadow and text-shadow are universal; the floor quoted is Tailwind v4's generated sheet.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Theme tokensset in @theme, used by a utility

Search CodeFronts

Loading…