Glow
launchui/glowFreeComponent
Decorative glow effects for adding visual interest.
Live preview
live · rendered by the registry
Rendered by launchui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.launchuicomponents.com/r/glow.jsonSource
1import { cva, VariantProps } from "class-variance-authority";2import React from "react";34import { cn } from "@/lib/utils";56const glowVariants = cva("absolute w-full", {7 variants: {8 variant: {9 top: "top-0",10 above: "-top-[128px]",11 bottom: "bottom-0",12 below: "-bottom-[128px]",13 center: "top-[50%]",14 },15 },16 defaultVariants: {17 variant: "top",18 },19});2021function Glow({22 className,23 variant,24 ...props25}: React.ComponentProps<"div"> & VariantProps<typeof glowVariants>) {26 return (27 <div28 data-slot="glow"29 className={cn(glowVariants({ variant }), className)}30 {...props}31 >32 <div33 className={cn(34 "from-brand-foreground/50 to-brand-foreground/0 absolute left-1/2 h-[256px] w-[60%] -translate-x-1/2 scale-[2.5] rounded-[50%] bg-radial from-10% to-60% opacity-20 sm:h-[512px] dark:opacity-100",35 variant === "center" && "-translate-y-1/2",36 )}37 />38 <div39 className={cn(40 "from-brand/30 to-brand-foreground/0 absolute left-1/2 h-[128px] w-[40%] -translate-x-1/2 scale-200 rounded-[50%] bg-radial from-10% to-60% opacity-20 sm:h-[256px] dark:opacity-100",41 variant === "center" && "-translate-y-1/2",42 )}43 />44 </div>45 );46}4748export default Glow;
What it pulls in
npm packages
Files it writes
More from launchui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Badgebadge | launchui | Components | Free | 2 deps | |
| Buttonbutton | launchui | Components | Free | 2 deps | |
| Cardcard | launchui | Components | Free | 1 dep | |
| Launch UI Baselaunchui | launchui | Components | Free | no deps · 10 files | |
| Mockupmockup | launchui | Components | Free | 1 dep | |
| Pro Dependenciespro | launchui | Components | Free | 14 deps | |
| Screenshotscreenshot | launchui | Components | Free | 1 dep |
