Glassmorphism
Frosted glass effects with transparency and blur backdrop
Live Preview
Subtle Glass
Minimal transparency for subtle separation.
Default Glass
Balanced transparency with good visibility.
Strong Glass
Maximum frosted effect for strong separation.
Desktop preview
Live updating
Your Claude Code/Cursor prompt
Send prompt + React component to Claude Code
Create glassmorphism cards with frosted glass effect and backdrop blur. Requirements: - React + TypeScript + Tailwind CSS - Backdrop blur and transparency effects - Subtle borders and shadows - Light and dark mode variations - Responsive design - Hover animations - Multiple card layouts - CSS variables for easy customization Custom Theme Colors: - Primary: #00ff88 - Secondary: #00e5ff - Accent: #4ade80 - Background: #0f172a - Text: #ffffff - Border: #334155 Additional Requirements: - Include b...
Color Presets:
React Component
// Glassmorphism Card Component
import { motion } from 'framer-motion'
import { ReactNode } from 'react'
interface GlassmorphismCardProps {
children: ReactNode
className?: string
theme?: 'light' | 'dark'
variant?: 'default' | 'strong' | 'subtle'
}
export default function GlassmorphismCard({
children,
className = '',
theme = 'dark',
variant = 'default'
}: GlassmorphismCardProps) {
const variants = {
default: theme === 'dark'
? 'bg-white/10 border-white/20'
: 'bg-black/5 border-black/10',
strong: theme === 'dark'
? 'bg-white/20 border-white/30'
: 'bg-black/10 border-black/20',
subtle: theme === 'dark'
? 'bg-white/5 border-white/10'
: 'bg-black/3 border-black/5'
}
return (
<motion.div
whileHover={{ y: -5, scale: 1.02 }}
transition={{ duration: 0.2 }}
className={`
relative overflow-hidden rounded-2xl border backdrop-blur-xl
shadow-xl hover:shadow-2xl transition-all duration-300
${variants[variant]}
${className}
`}
>
{/* Gradient Overlay */}
<div className={`
absolute inset-0 bg-gradient-to-br opacity-50
${theme === 'dark'
? 'from-ui-primary-500/10 to-ui-secondary-500/10'
: 'from-ui-primary-700/10 to-ui-secondary-700/10'
}
`}></div>
{/* Content */}
<div className="relative z-10 p-6">
{children}
</div>
{/* Shine Effect */}
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full hover:translate-x-full transition-transform duration-1000"></div>
</motion.div>
)
}
// Usage Examples
export function GlassmorphismShowcase({ theme = 'dark' }) {
return (
<div className="space-y-6">
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
<GlassmorphismCard variant="subtle" theme={theme}>
<h3 className="text-lg font-semibold mb-2">Subtle Glass</h3>
<p className="text-sm opacity-80">
Minimal transparency for subtle background separation.
</p>
</GlassmorphismCard>
<GlassmorphismCard variant="default" theme={theme}>
<h3 className="text-lg font-semibold mb-2">Default Glass</h3>
<p className="text-sm opacity-80">
Balanced transparency with good visibility.
</p>
</GlassmorphismCard>
<GlassmorphismCard variant="strong" theme={theme}>
<h3 className="text-lg font-semibold mb-2">Strong Glass</h3>
<p className="text-sm opacity-80">
Maximum frosted effect for strong separation.
</p>
</GlassmorphismCard>
</div>
</div>
)
}