# Neon bar sign card

> A neon sign on a brick wall that flickers as it lights up; the switch turns it off and on again.

- Category: [Cards](https://library.aimran.es/components/cards)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-card-neon-bar
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Neon is about light spilling onto a surface, so the wall matters as much as the letters. The bricks are drawn with conic and linear gradients, the script word glows through stacked text shadows, and switching it on plays a stuttering flicker before it settles, with a rare dip later. It suits bars, music venues, night events and late opening hours.

The main color is the large tube, the second the small line underneath. Write one short word for the sign, since script fonts get busy with long text, and change the bar name and hours.

## Code

### HTML

```html
<article class="uvq07-neo"><div class="wl"><p class="sg">Open</p><p class="sb">vermouth · cocktails · vinyl</p></div><footer><div><b>Bar Farola</b><span>Today until 2 am</span></div><button type="button" role="switch" aria-checked="true" aria-label="Sign light"><i></i></button></footer></article>
```

### CSS

```css
.uvq07-neo {
  --c1: #ff3d7f;
  --c2: #38e8ff;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq07-neo {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 17.5em;
  overflow: hidden;
  border-radius: 1.3em;
  color: #f4e9ea;
  background: #17110f;
  box-shadow: 0 1.4em 2.4em -1.2em rgba(0,0,0,.7),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
}

.uvq07-neo .wl {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .35em;
  height: 9.5em;
  background: radial-gradient(70% 60% at 50% 45%,transparent,rgba(0,0,0,.55)),linear-gradient(#0000 calc(100% - 2px),#120c0b 0) 0 0/100% 1.1em,conic-gradient(at 2px 1.1em,#0000 75%,#120c0b 0) 0 0/2.4em 2.2em,conic-gradient(at 2px 1.1em,#0000 75%,#120c0b 0) 1.2em 1.1em/2.4em 2.2em,linear-gradient(90deg,#4a2c25,#3d241f 40%,#4a2b23);
}

.uvq07-neo .wl::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 50% at 50% 45%,color-mix(in srgb,var(--c1) 38%,transparent),transparent 70%);
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-neo .sg {
  position: relative;
  margin: 0;
  font: 400 3.1em/1 "Brush Script MT","Segoe Script","Snell Roundhand",cursive;
  color: #fff3f8;
  text-shadow: 0 0 .04em #fff,0 0 .12em var(--c1),0 0 .3em var(--c1),0 0 .7em var(--c1),0 0 1.4em color-mix(in srgb,var(--c1) 70%,transparent);
  animation: uvq07-neo-i calc(7s / var(--k)) steps(1) infinite;
}

.uvq07-neo .sb {
  position: relative;
  margin: 0;
  font-size: .7em;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #effcff;
  text-shadow: 0 0 .1em var(--c2),0 0 .35em var(--c2),0 0 .8em var(--c2);
}

.uvq07-neo.ig .sg {
  animation: uvq07-neo-f calc(0.9s / var(--k)) steps(1) both;
}

.uvq07-neo.ig .sb {
  animation: uvq07-neo-f calc(0.9s / var(--k)) steps(1) calc(0.25s / var(--k)) both;
}

.uvq07-neo.off .sg {
  color: color-mix(in srgb,var(--c1) 25%,#3b2d30);
  text-shadow: none;
  animation: none;
}

.uvq07-neo.off .sb {
  color: color-mix(in srgb,var(--c2) 20%,#2f3536);
  text-shadow: none;
  animation: none;
}

.uvq07-neo.off .wl::before {
  opacity: 0;
}

.uvq07-neo footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8em;
  padding: .9em 1.1em;
}

.uvq07-neo footer b {
  display: block;
  font-size: .95em;
}

.uvq07-neo footer span {
  font-size: .72em;
  opacity: .65;
}

.uvq07-neo button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  flex: none;
  width: 3.2em;
  height: 1.8em;
  border-radius: 2em;
  background: #2b2224;
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.08);
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-neo button i {
  position: absolute;
  left: .2em;
  top: .2em;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: linear-gradient(180deg,#f1e7e9,#b7a9ac);
  box-shadow: 0 .15em .3em rgba(0,0,0,.5);
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq07-neo button[aria-checked="true"] {
  background: color-mix(in srgb,var(--c1) 55%,#2b2224);
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.4),0 0 .8em color-mix(in srgb,var(--c1) 45%,transparent);
}

.uvq07-neo button[aria-checked="true"] i {
  transform: translateX(1.4em);
}

.uvq07-neo button:active i {
  width: 1.6em;
}

.uvq07-neo button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq07-neo-f {
  0% {
    opacity: .15;
  }
  8% {
    opacity: 1;
  }
  12% {
    opacity: .2;
  }
  22% {
    opacity: 1;
  }
  26% {
    opacity: .35;
  }
  34%,100% {
    opacity: 1;
  }
}

@keyframes uvq07-neo-i {
  0%,90%,94%,100% {
    opacity: 1;
  }
  92% {
    opacity: .55;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq07-neo,.uvq07-neo *,.uvq07-neo *::before,.uvq07-neo *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### JavaScript

```js
document.querySelectorAll(".uvq07-neo").forEach(el => {
  const b=el.querySelector("button");const ig=()=>{el.classList.remove("ig");void el.offsetWidth;el.classList.add("ig")};
b.addEventListener("click",()=>{const on=b.getAttribute("aria-checked")!=="true";b.setAttribute("aria-checked",String(on));el.classList.toggle("off",!on);if(on)ig();else el.classList.remove("ig")});ig()
});
```

### React

```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq07-neo {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 17.5em;
  overflow: hidden;
  border-radius: 1.3em;
  color: #f4e9ea;
  background: #17110f;
  box-shadow: 0 1.4em 2.4em -1.2em rgba(0,0,0,.7),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
}

.uvq07-neo .wl {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .35em;
  height: 9.5em;
  background: radial-gradient(70% 60% at 50% 45%,transparent,rgba(0,0,0,.55)),linear-gradient(#0000 calc(100% - 2px),#120c0b 0) 0 0/100% 1.1em,conic-gradient(at 2px 1.1em,#0000 75%,#120c0b 0) 0 0/2.4em 2.2em,conic-gradient(at 2px 1.1em,#0000 75%,#120c0b 0) 1.2em 1.1em/2.4em 2.2em,linear-gradient(90deg,#4a2c25,#3d241f 40%,#4a2b23);
}

.uvq07-neo .wl::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 50% at 50% 45%,color-mix(in srgb,var(--c1) 38%,transparent),transparent 70%);
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-neo .sg {
  position: relative;
  margin: 0;
  font: 400 3.1em/1 "Brush Script MT","Segoe Script","Snell Roundhand",cursive;
  color: #fff3f8;
  text-shadow: 0 0 .04em #fff,0 0 .12em var(--c1),0 0 .3em var(--c1),0 0 .7em var(--c1),0 0 1.4em color-mix(in srgb,var(--c1) 70%,transparent);
  animation: uvq07-neo-i calc(7s / var(--k)) steps(1) infinite;
}

.uvq07-neo .sb {
  position: relative;
  margin: 0;
  font-size: .7em;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #effcff;
  text-shadow: 0 0 .1em var(--c2),0 0 .35em var(--c2),0 0 .8em var(--c2);
}

.uvq07-neo.ig .sg {
  animation: uvq07-neo-f calc(0.9s / var(--k)) steps(1) both;
}

.uvq07-neo.ig .sb {
  animation: uvq07-neo-f calc(0.9s / var(--k)) steps(1) calc(0.25s / var(--k)) both;
}

.uvq07-neo.off .sg {
  color: color-mix(in srgb,var(--c1) 25%,#3b2d30);
  text-shadow: none;
  animation: none;
}

.uvq07-neo.off .sb {
  color: color-mix(in srgb,var(--c2) 20%,#2f3536);
  text-shadow: none;
  animation: none;
}

.uvq07-neo.off .wl::before {
  opacity: 0;
}

.uvq07-neo footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8em;
  padding: .9em 1.1em;
}

.uvq07-neo footer b {
  display: block;
  font-size: .95em;
}

.uvq07-neo footer span {
  font-size: .72em;
  opacity: .65;
}

.uvq07-neo button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  flex: none;
  width: 3.2em;
  height: 1.8em;
  border-radius: 2em;
  background: #2b2224;
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.08);
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-neo button i {
  position: absolute;
  left: .2em;
  top: .2em;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: linear-gradient(180deg,#f1e7e9,#b7a9ac);
  box-shadow: 0 .15em .3em rgba(0,0,0,.5);
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq07-neo button[aria-checked="true"] {
  background: color-mix(in srgb,var(--c1) 55%,#2b2224);
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.4),0 0 .8em color-mix(in srgb,var(--c1) 45%,transparent);
}

.uvq07-neo button[aria-checked="true"] i {
  transform: translateX(1.4em);
}

.uvq07-neo button:active i {
  width: 1.6em;
}

.uvq07-neo button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq07-neo-f {
  0% {
    opacity: .15;
  }
  8% {
    opacity: 1;
  }
  12% {
    opacity: .2;
  }
  22% {
    opacity: 1;
  }
  26% {
    opacity: .35;
  }
  34%,100% {
    opacity: 1;
  }
}

@keyframes uvq07-neo-i {
  0%,90%,94%,100% {
    opacity: 1;
  }
  92% {
    opacity: .55;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq07-neo,.uvq07-neo *,.uvq07-neo *::before,.uvq07-neo *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const b=el.querySelector("button");const ig=()=>{el.classList.remove("ig");void el.offsetWidth;el.classList.add("ig")};
b.addEventListener("click",()=>{const on=b.getAttribute("aria-checked")!=="true";b.setAttribute("aria-checked",String(on));el.classList.toggle("off",!on);if(on)ig();else el.classList.remove("ig")});ig()
}

export default function CardNeonBar() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#ff3d7f",
          "--c2": "#38e8ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <article className="uvq07-neo"><div className="wl"><p className="sg">Open</p><p className="sb">vermouth · cocktails · vinyl</p></div><footer><div><b>Bar Farola</b><span>Today until 2 am</span></div><button type="button" role="switch" aria-checked="true" aria-label="Sign light"><i></i></button></footer></article>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Neon bar sign card” block (Cards) from AIMRAN Library to my project.

## What it is
A neon sign on a brick wall that flickers as it lights up; the switch turns it off and on again.

## Chosen settings
- Main color: #ff3d7f
- Secondary color: #38e8ff
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Abierto"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq07-neo {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 17.5em;
  overflow: hidden;
  border-radius: 1.3em;
  color: #f4e9ea;
  background: #17110f;
  box-shadow: 0 1.4em 2.4em -1.2em rgba(0,0,0,.7),0 0 0 1px color-mix(in srgb,var(--fg) 8%,transparent);
}

.uvq07-neo .wl {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .35em;
  height: 9.5em;
  background: radial-gradient(70% 60% at 50% 45%,transparent,rgba(0,0,0,.55)),linear-gradient(#0000 calc(100% - 2px),#120c0b 0) 0 0/100% 1.1em,conic-gradient(at 2px 1.1em,#0000 75%,#120c0b 0) 0 0/2.4em 2.2em,conic-gradient(at 2px 1.1em,#0000 75%,#120c0b 0) 1.2em 1.1em/2.4em 2.2em,linear-gradient(90deg,#4a2c25,#3d241f 40%,#4a2b23);
}

.uvq07-neo .wl::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 50% at 50% 45%,color-mix(in srgb,var(--c1) 38%,transparent),transparent 70%);
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-neo .sg {
  position: relative;
  margin: 0;
  font: 400 3.1em/1 "Brush Script MT","Segoe Script","Snell Roundhand",cursive;
  color: #fff3f8;
  text-shadow: 0 0 .04em #fff,0 0 .12em var(--c1),0 0 .3em var(--c1),0 0 .7em var(--c1),0 0 1.4em color-mix(in srgb,var(--c1) 70%,transparent);
  animation: uvq07-neo-i calc(7s / var(--k)) steps(1) infinite;
}

.uvq07-neo .sb {
  position: relative;
  margin: 0;
  font-size: .7em;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #effcff;
  text-shadow: 0 0 .1em var(--c2),0 0 .35em var(--c2),0 0 .8em var(--c2);
}

.uvq07-neo.ig .sg {
  animation: uvq07-neo-f calc(0.9s / var(--k)) steps(1) both;
}

.uvq07-neo.ig .sb {
  animation: uvq07-neo-f calc(0.9s / var(--k)) steps(1) calc(0.25s / var(--k)) both;
}

.uvq07-neo.off .sg {
  color: color-mix(in srgb,var(--c1) 25%,#3b2d30);
  text-shadow: none;
  animation: none;
}

.uvq07-neo.off .sb {
  color: color-mix(in srgb,var(--c2) 20%,#2f3536);
  text-shadow: none;
  animation: none;
}

.uvq07-neo.off .wl::before {
  opacity: 0;
}

.uvq07-neo footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8em;
  padding: .9em 1.1em;
}

.uvq07-neo footer b {
  display: block;
  font-size: .95em;
}

.uvq07-neo footer span {
  font-size: .72em;
  opacity: .65;
}

.uvq07-neo button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  flex: none;
  width: 3.2em;
  height: 1.8em;
  border-radius: 2em;
  background: #2b2224;
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.08);
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq07-neo button i {
  position: absolute;
  left: .2em;
  top: .2em;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: linear-gradient(180deg,#f1e7e9,#b7a9ac);
  box-shadow: 0 .15em .3em rgba(0,0,0,.5);
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq07-neo button[aria-checked="true"] {
  background: color-mix(in srgb,var(--c1) 55%,#2b2224);
  box-shadow: inset 0 .1em .3em rgba(0,0,0,.4),0 0 .8em color-mix(in srgb,var(--c1) 45%,transparent);
}

.uvq07-neo button[aria-checked="true"] i {
  transform: translateX(1.4em);
}

.uvq07-neo button:active i {
  width: 1.6em;
}

.uvq07-neo button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq07-neo-f {
  0% {
    opacity: .15;
  }
  8% {
    opacity: 1;
  }
  12% {
    opacity: .2;
  }
  22% {
    opacity: 1;
  }
  26% {
    opacity: .35;
  }
  34%,100% {
    opacity: 1;
  }
}

@keyframes uvq07-neo-i {
  0%,90%,94%,100% {
    opacity: 1;
  }
  92% {
    opacity: .55;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq07-neo,.uvq07-neo *,.uvq07-neo *::before,.uvq07-neo *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const b=el.querySelector("button");const ig=()=>{el.classList.remove("ig");void el.offsetWidth;el.classList.add("ig")};
b.addEventListener("click",()=>{const on=b.getAttribute("aria-checked")!=="true";b.setAttribute("aria-checked",String(on));el.classList.toggle("off",!on);if(on)ig();else el.classList.remove("ig")});ig()
}

export default function CardNeonBar() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#ff3d7f",
          "--c2": "#38e8ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <article className="uvq07-neo"><div className="wl"><p className="sg">Open</p><p className="sb">vermouth · cocktails · vinyl</p></div><footer><div><b>Bar Farola</b><span>Today until 2 am</span></div><button type="button" role="switch" aria-checked="true" aria-label="Sign light"><i></i></button></footer></article>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
