Glass Float

Frosted glass floating stats cards with parallax effects.

Main Features of Glass Float

How to Use Glass Float in Next.js

Installation Guide for Glass Float

Props

Customize the component with these props

PropertyTypeDefaultDescription
stats
Array<{icon: LucideIcon, value: number, label: string}>[]Array of stat items with icon, value, and label.
backgroundColor
string#0f172aBackground color (hex, rgb, or hsl).
blob1Color
string#9333eaFirst blob color for background effect.
blob2Color
string#06b6d4Second blob color for background effect.
cardBgColor
stringrgba(255,255,255,0.05)Card background color.
cardBorderColor
stringrgba(255,255,255,0.1)Card border color.
cardHoverBgColor
stringrgba(255,255,255,0.1)Card hover background color.
iconBgFromColor
stringrgba(255,255,255,0.2)Icon gradient start color.
iconBgToColor
stringtransparentIcon gradient end color.
iconColor
string#ffffffIcon color.
valueColor
string#ffffffValue text color.
labelColor
stringrgba(255,255,255,0.6)Label text color.

When to Use

Excellent for modern tech brands, AI platforms, and Next.js applications that want a high-fidelity, 'airy' aesthetic. Use this React component for a stats section where metrics float inside vibrant, blurry glass cards with deep parallax effects.

Best Practices

Maintain consistent spacing within your design system by using it on dark or textured backgrounds to maximize the backdrop-blur effect. Follow React best practices by pairing it with high-contrast font colors. Optimize for performance by using hardware-accelerated transforms for the parallax tracking.

Why This Component Matters in Modern UI Development

Glassmorphism creates a sense of depth and technical sophistication. This production-ready UI component helpsคุณ build an interface that feels lightweight and premium, improving the perceived quality of your numerical data.

Frequently Asked Questions

QHow is the glass effect made?

It uses semi-transparent backgrounds and `backdrop-filter: blur()` to simulate physical frosted glass panes.

QDoes the parallax follow the mouse?

Yes, the cards feature a subtle 'float' animation that responds to either screen scroll or mouse movement for a sense of physical weight.

QCan I add more blobs?

The background feature uses two primary glow blobs (`blob1Color` and `blob2Color`) to create the atmospheric depth behind the cards.

Glass Float - React Stats Counter & Metrics | Uilora