Introducing Nyx UI v1.2.0

Apple Glass Effect

A sophisticated glass morphism component with realistic glass effects, tint options, and customizable distortion.

background image

Installation

Usage

import { GlassContainer } from "@/components/ui/glass-container";
<GlassContainer blur={3} variant="prominent" tint="warm" shadow="large">
  <div className="text-white">Your content here</div>
</GlassContainer>

Props

PropTypeDefaultDescription
childrenReact.ReactNodeundefinedContent to be rendered inside the glass container.
classNamestring""Additional CSS classes to apply.
variantstring"default"Predefined variants with different blur, opacity, and shadow configurations (default, prominent, regular, thin).
blurnumbervaries by variantBackdrop blur amount in pixels.
opacitynumbervaries by variantOpacity of the glass overlay.
distortionstring"medium"Glass distortion effect intensity (none, subtle, medium, strong).
tintstring"warm"Color tint of the glass effect (neutral, warm, cool, vibrant).
borderbooleantrueWhether to show the glass border highlight.
hoverbooleantrueWhether to enable hover effects (scale and shadow).
glassOverlaybooleantrueWhether to apply the tinted glass overlay.
highlightColorstringrgba(255,255,255,0.4)Color of the specular highlights.
highlightOpacitynumber1Opacity of the highlight effect.
innerGlowColorstringrgba(255,255,255,0.1)Color of the inner glow effect.
innerGlowOpacitynumber1Opacity of the inner glow effect.
specularIntensitynumber0.4Intensity of the specular highlights (0-1).