# Curious eyes loader

> Two cartoon eyes that blink now and then while their pupils follow a little dot from side to side.

- Category: [Loaders](https://library.aimran.es/components/loaders)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/css-eyes
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Nothing says “looking for it” like a pair of eyes searching. Put this loader on the results page of a search, on a pet adoption site while it finds animals near you or in a recruiting app matching candidates to a job. The blink every few seconds gives it personality, and it is still just HTML and CSS.

Pair it with a short, friendly line like “Looking for matches…” so the joke lands. The whites of the eyes stay white, so it reads well on dark backgrounds too. Skip it for serious moments like payments, where cute can feel off.

## Code

### HTML

```html
<div class="ul-eye"><div><i></i><i></i></div><b></b></div>
```

### CSS

```css
.ul-eye {
  --c1: #0071e3;
  --c2: #8ec5ff;
  --s: 72px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --bg: #f5f5f7;
}

.ul-eye {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--s) / 3);
}

.ul-eye>div {
  display: flex;
  gap: calc(var(--s) / 6);
}

.ul-eye i {
  position: relative;
  width: calc(var(--s) * .7);
  height: calc(var(--s) * .7);
  border-radius: 50%;
  background: #fff;
  border: calc(var(--s) / 20) solid var(--c1);
  animation: ul-blink calc(3.2s / var(--k)) ease-in-out infinite;
}

.ul-eye i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  height: 40%;
  margin: -20%;
  border-radius: 50%;
  background: var(--c1);
  animation: ul-look calc(3.2s / var(--k)) cubic-bezier(.65,0,.35,1) infinite;
}

.ul-eye b {
  width: calc(var(--s) / 6);
  height: calc(var(--s) / 6);
  border-radius: 50%;
  background: var(--c2);
  animation: ul-dot calc(3.2s / var(--k)) cubic-bezier(.65,0,.35,1) infinite;
}

@keyframes ul-blink {
  0%,44%,50%,100% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(.1);
  }
}

@keyframes ul-look {
  0%,100% {
    transform: translate(-45%,40%);
  }
  50% {
    transform: translate(45%,40%);
  }
}

@keyframes ul-dot {
  0%,100% {
    transform: translateX(calc(var(--s) * -.8));
  }
  50% {
    transform: translateX(calc(var(--s) * .8));
  }
}
```

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.ul-eye {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--s) / 3);
}

.ul-eye>div {
  display: flex;
  gap: calc(var(--s) / 6);
}

.ul-eye i {
  position: relative;
  width: calc(var(--s) * .7);
  height: calc(var(--s) * .7);
  border-radius: 50%;
  background: #fff;
  border: calc(var(--s) / 20) solid var(--c1);
  animation: ul-blink calc(3.2s / var(--k)) ease-in-out infinite;
}

.ul-eye i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  height: 40%;
  margin: -20%;
  border-radius: 50%;
  background: var(--c1);
  animation: ul-look calc(3.2s / var(--k)) cubic-bezier(.65,0,.35,1) infinite;
}

.ul-eye b {
  width: calc(var(--s) / 6);
  height: calc(var(--s) / 6);
  border-radius: 50%;
  background: var(--c2);
  animation: ul-dot calc(3.2s / var(--k)) cubic-bezier(.65,0,.35,1) infinite;
}

@keyframes ul-blink {
  0%,44%,50%,100% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(.1);
  }
}

@keyframes ul-look {
  0%,100% {
    transform: translate(-45%,40%);
  }
  50% {
    transform: translate(45%,40%);
  }
}

@keyframes ul-dot {
  0%,100% {
    transform: translateX(calc(var(--s) * -.8));
  }
  50% {
    transform: translateX(calc(var(--s) * .8));
  }
}
`;

export default function LoaderEyes() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "72px",
          "--k": "1",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="ul-eye"><div><i></i><i></i></div><b></b></div>
      </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 “Curious eyes loader” block (Loaders) from AIMRAN Library to my project.

## What it is
Two cartoon eyes that blink now and then while their pupils follow a little dot from side to side.

## Chosen settings
- Main color: #0071e3
- Secondary color: #8ec5ff
- Size: 72px (from 24 to 120px)
- Speed: 1x (from 0.5 to 2x)

## 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
import type { CSSProperties } from "react";

const css = `
.ul-eye {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--s) / 3);
}

.ul-eye>div {
  display: flex;
  gap: calc(var(--s) / 6);
}

.ul-eye i {
  position: relative;
  width: calc(var(--s) * .7);
  height: calc(var(--s) * .7);
  border-radius: 50%;
  background: #fff;
  border: calc(var(--s) / 20) solid var(--c1);
  animation: ul-blink calc(3.2s / var(--k)) ease-in-out infinite;
}

.ul-eye i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  height: 40%;
  margin: -20%;
  border-radius: 50%;
  background: var(--c1);
  animation: ul-look calc(3.2s / var(--k)) cubic-bezier(.65,0,.35,1) infinite;
}

.ul-eye b {
  width: calc(var(--s) / 6);
  height: calc(var(--s) / 6);
  border-radius: 50%;
  background: var(--c2);
  animation: ul-dot calc(3.2s / var(--k)) cubic-bezier(.65,0,.35,1) infinite;
}

@keyframes ul-blink {
  0%,44%,50%,100% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(.1);
  }
}

@keyframes ul-look {
  0%,100% {
    transform: translate(-45%,40%);
  }
  50% {
    transform: translate(45%,40%);
  }
}

@keyframes ul-dot {
  0%,100% {
    transform: translateX(calc(var(--s) * -.8));
  }
  50% {
    transform: translateX(calc(var(--s) * .8));
  }
}
`;

export default function LoaderEyes() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "72px",
          "--k": "1",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="ul-eye"><div><i></i><i></i></div><b></b></div>
      </div>
    </>
  );
}
```

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