import {GlassCard} from '@developer-hub/liquid-glass'
function App() {
return (
<GlassCard>
<div className="p-6">
<h2>Welcome to Liquid Glass</h2>
<p>Experience the future of UI design with smooth, organic animations.</p>
</div>
</GlassCard>
)
}
import {GlassCard} from '@developer-hub/liquid-glass'
<GlassCard
displacementScale={100}
blurAmount={0.01}
cornerRadius={10}
padding="8px 16px"
onClick={() => console.log('Glass button clicked!')}
>
<span className="text-white font-medium">Get Started</span>
</GlassCard>
import {GlassCard} from '@developer-hub/liquid-glass'
<GlassCard
shadowMode={true}
cornerRadius={16}
className="max-w-md mx-auto"
>
<div className="p-8">
<h3 className="text-xl font-bold mb-4">Premium Features</h3>
<p className="text-gray-600">Enhanced visual effects optimized for light themes.</p>
</div>
</GlassCard>
A stunning React component that brings Apple's WWDC 2025-inspired liquid glass transparency effects to your applications. This component combines dynamic SVG-based liquid animations with sophisticated glassmorphism aesthetics for a truly modern user interface.
Install the package via npm:
npm install @developer-hub/liquid-glass
Import and use the component in your React application:
import {GlassCard} from '@developer-hub/liquid-glass'
function App() {
return (
<GlassCard>
<div className="p-6">
<h2>Welcome to Liquid Glass</h2>
<p>Experience the future of UI design with smooth, organic animations.</p>
</div>
</GlassCard>
)
}
<GlassCard
displacementScale={100}
blurAmount={0.01}
cornerRadius={10}
padding="8px 16px"
onClick={() => console.log('Glass button clicked!')}
>
<span className="text-white font-medium">Get Started</span>
</GlassCard>
<GlassCard
shadowMode={true}
cornerRadius={16}
className="max-w-md mx-auto"
>
<div className="p-8">
<h3 className="text-xl font-bold mb-4">Premium Features</h3>
<p className="text-gray-600">Enhanced visual effects optimized for light themes.</p>
</div>
</GlassCard>
Property | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | - | Content rendered within the glass container |
displacementScale | number | 100 | Intensity of the liquid displacement effect (0-200) |
blurAmount | number | 0.01 | Blur intensity for the glass effect (0-1) |
cornerRadius | number | 999 | Border radius in pixels |
className | string | "" | Additional CSS classes for custom styling |
padding | string | - | CSS padding value (e.g., "16px", "1rem") |
style | React.CSSProperties | - | Inline styles object |
shadowMode | boolean | false | Optimizes appearance for light backgrounds |
onClick | () => void | - | Click event handler |
Faithfully recreates Apple's WWDC 2025 glassmorphism aesthetic with pixel-perfect attention to detail
SVG-powered blob animations that create mesmerizing, fluid visual effects
Dynamic animations that respond naturally to user cursor movement
Seamlessly adapts to desktop, tablet, and mobile screen sizes
Automatically adjusts to dark and light themes with sophisticated color management
Respects prefers-reduced-motion and includes proper ARIA support
The component provides multiple layers of customization:
The component automatically handles:
.my-custom-glass {
--glass-opacity: 0.15;
--glass-blur: 20px;
--animation-duration: 3s;
}
Version 76 and above
Version 72 and above
Version 13 and above
Note: The component requires backdrop-filter support for optimal glass effects. Older browsers receive a graceful fallback with standard transparency effects.
Special thanks to Apple for the incredible design inspiration from WWDC 2025. Their innovative glassmorphism aesthetic and attention to detail continues to push the boundaries of modern UI design.
This component was inspired by the excellent work from the liquid-glass-react library. Their foundational approach to liquid glass effects provided valuable insights for creating this minimal version.
Heartfelt appreciation to the amazing contributors who made this library possible:
Core contributor and maintainer
Core contributor and maintainer
We welcome contributions from the community! Whether it's bug reports, feature requests, or code contributions, please feel free to fork the repository, create a feature branch, and submit a pull request with detailed description.
License: MIT License © developer-hub
Questions or Issues? Check out our GitHub Issues or start a Discussion.