Glassmorphism Button
A modern button with Apple-style glassmorphism: blurred background, soft transparency, and animated shadow on hover.
Demo
Interactive Demo
Hover to see the glassmorphism blur and shadow effect.
tsx
Loading...
Installation
Install the required dependencies to get started:
bash
Loading...
Usage
Import and use the AppleGlassEffet component in your app:
tsx
Loading...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Button content (text or elements). |
className | string | "" | Additional CSS classes for the button. |
type | "button" | "submit" | "reset" | "submit" | Button type attribute. |
onClick | (e: React.MouseEvent<HTMLButtonElement>) => void | undefined | Click handler for the button. |
Features
- Glassmorphism effect with blur and transparency
- Animated hover state for background and shadow
- Customizable via className
- Accessible and keyboard-friendly
- TypeScript support
Dependencies
Next.js 15+
Framer Motion
Tailwind CSS (recommended)
TypeScript (recommended)