# Input with pulsed background animation

> Input with pulsed background animation

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-input-24).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-input-24
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-input-24-light-ce8a19726ebe9e91.png
- Registry item: https://reui.io/r/new-york-v4/c-input-24.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-input-24.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `field`, `input`

## Files

### `c-input-24.tsx`

```tsx
"use client"

import { useState } from "react"

import { Field, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"

export function Pattern() {
  const [isFocused, setIsFocused] = useState(false)

  return (
    <Field className="max-w-xs">
      <FieldLabel htmlFor="pulsed-input">Pulsed Background</FieldLabel>
      <div className="relative">
        <div
          className={`bg-primary/20 pointer-events-none absolute inset-0 rounded-md transition-opacity duration-300 ${
            isFocused ? "opacity-0" : "animate-pulse"
          }`}
        />
        <Input
          id="pulsed-input"
          placeholder="Animation stops on focus..."
          onFocus={() => setIsFocused(true)}
          onBlur={() => setIsFocused(false)}
          className="focus-visible:bg-background relative bg-transparent shadow-none transition-colors duration-300"
        />
      </div>
    </Field>
  )
}
```
