Animated Background Glass
shadcn-glass-ui/animated-background-glassFreeComponent
Animated gradient background with floating orbs for glassmorphism UIs. * Provides an immersive atmosphere with theme-aware styling. * * ## Features
Install it
npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/animated-background-glass.jsonSource
1/**2 * AnimatedBackgroundGlass Component3 *4 * Animated gradient background with floating orbs for glassmorphism UIs.5 * Provides an immersive atmosphere with theme-aware styling.6 *7 * ## Features8 * - Theme-aware gradient background (glass/light/aurora)9 * - 5 floating animated orbs with blur effects10 * - Fixed positioning for full-page backgrounds11 * - Performance-optimized CSS animations (8s cycle)12 * - Configurable center orb visibility13 *14 * ## Orb Configuration15 * - **Orb 1:** Top-left, 600px, purple/blue tones16 * - **Orb 2:** Bottom-right, 700px, blue/violet tones, 2s delay17 * - **Orb 3:** Center-right, 500px, pink/cyan tones, 4s delay18 * - **Orb 4:** Bottom-left, 450px, cyan/violet tones, 6s delay19 * - **Orb 5:** Center, 500px, violet (glass theme only by default)20 *21 * ## CSS Variables22 * Customize colors via theme CSS variables:23 * - `--orb-1` through `--orb-5`: Orb colors (OKLCH with opacity)24 * - `--bg-from`, `--bg-via`, `--bg-to`: Gradient stops25 *26 * @example Basic usage27 * ```tsx28 * import { AnimatedBackgroundGlass } from 'shadcn-glass-ui'29 *30 * function App() {31 * return (32 * <>33 * <AnimatedBackgroundGlass />34 * <main className="relative z-10">35 * Your content here36 * </main>37 * </>38 * )39 * }40 * ```41 *42 * @example With center orb forced on43 * ```tsx44 * <AnimatedBackgroundGlass showCenterOrb={true} />45 * ```46 *47 * @example With reduced opacity48 * ```tsx49 * <AnimatedBackgroundGlass className="opacity-50" />50 * ```51 *52 * @example With dark overlay for better contrast53 * ```tsx54 * <>55 * <AnimatedBackgroundGlass />56 * <div className="fixed inset-0 bg-black/30 z-[1]" />57 * <main className="relative z-10">Content</main>58 * </>59 * ```60 *61 * @accessibility62 * - Uses `aria-hidden="true"` as purely decorative element63 * - Does not interfere with keyboard navigation64 * - No interactive elements within the component65 * - Animation uses CSS (respects `prefers-reduced-motion` when configured)66 *67 * @since v1.0.068 */6970import { forwardRef, type CSSProperties } from 'react';71import { cn } from '@/lib/utils';72import { useTheme } from '@/lib/theme-context';73import '@/glass-theme.css';7475// ========================================76// PROPS INTERFACE77// ========================================7879/**80 * Props for AnimatedBackgroundGlass component.81 *82 * Extends standard div attributes (excluding `style`) for maximum flexibility.83 * The `style` prop is excluded because the component uses internal inline styles84// … truncated
More from shadcn-glass-ui
All 76 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alert Glassalert-glass | shadcn-glass-ui | Components | Free | no deps | |
| Avatar Glassavatar-glass | shadcn-glass-ui | Components | Free | no deps | |
| Badge Glassbadge-glass | shadcn-glass-ui | Components | Free | no deps | |
| Base Progress Glassbase-progress-glass | shadcn-glass-ui | Components | Free | no deps | |
| Button Glassbutton-glass | shadcn-glass-ui | Components | Free | no deps | |
| Card Glasscard-glass | shadcn-glass-ui | Components | Free | no deps | |
| Checkbox Glasscheckbox-glass | shadcn-glass-ui | Components | Free | no deps | |
| Circular Progress Glasscircular-progress-glass | shadcn-glass-ui | Components | Free | no deps |
