# Frosted blur button

> A see-through button that blurs whatever is behind it and gives slightly under your finger.

- Category: [Buttons](https://library.aimran.es/components/buttons)
- Built with: React + Motion
- Live editor: https://library.aimran.es/blocks/glass-button
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Glass buttons shine when they sit on top of something: a hero photo on a hotel site, a video background on a music landing page or a map in a delivery app. The frosted blur keeps the text readable without hiding the image. If you were after a glassmorphism button in React, this one keeps it subtle.

On a flat, plain background the blur has nothing to work with and the button just looks grey, so test it over your real image. Keep the label short and check the contrast on both light and dark parts of the photo.

## Code

### React (Motion)

```tsx
import { motion } from "framer-motion";

interface GlassButtonProps {
  text?: string;
}

export default function GlassButton({
  text = "View details",
}: GlassButtonProps) {
  return (
    <motion.button
      type="button"
      whileTap={{ scale: 0.96 }}
      transition={{ type: "spring", stiffness: 300, damping: 30 }}
      className="rounded-full border border-black/10 bg-white/70 px-6 py-3 text-sm font-medium text-[#1d1d1f] dark:text-[#f5f5f7] shadow-[0_1px_2px_rgba(0,0,0,0.03),0_8px_28px_rgba(0,0,0,0.05)] backdrop-blur-[20px] backdrop-saturate-[180%] dark:border-white/10 dark:bg-black/70"
    >
      {text}
    </motion.button>
  );
}
```

## 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 “Frosted blur button” block (Buttons) from AIMRAN Library to my project.

## What it is
A see-through button that blurs whatever is behind it and gives slightly under your finger.

## Chosen settings
- Text: "View details"

## 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 React + TypeScript, with framer-motion for the animation and lucide-react for the icons. 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 { motion } from "framer-motion";

interface GlassButtonProps {
  text?: string;
}

export default function GlassButton({
  text = "View details",
}: GlassButtonProps) {
  return (
    <motion.button
      type="button"
      whileTap={{ scale: 0.96 }}
      transition={{ type: "spring", stiffness: 300, damping: 30 }}
      className="rounded-full border border-black/10 bg-white/70 px-6 py-3 text-sm font-medium text-[#1d1d1f] dark:text-[#f5f5f7] shadow-[0_1px_2px_rgba(0,0,0,0.03),0_8px_28px_rgba(0,0,0,0.05)] backdrop-blur-[20px] backdrop-saturate-[180%] dark:border-white/10 dark:bg-black/70"
    >
      {text}
    </motion.button>
  );
}
```

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