Dark Carbon Spotlight
Free Background-gradient React component — DarkCarbonSpotlightBackground. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.
Carbon black stage with a soft overhead spotlight and vignette — product reveals, keynotes, and gallery dark modes.
Preview
Your content
Setup
How to use
Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.
- 1
Run in your terminal:
$npm install clsx tailwind-merge lucide-react - 2
Copy
lib/cn.tsbelow. Skip if you already havecn(). - 3
Copy the code below and create
components/background-gradient/dark-carbon-spotlight-background.tsxin your project. - 4
Import and render:
Exampleimport { DarkCarbonSpotlightBackground } from "@/components/background-gradient/dark-carbon-spotlight-background";
lib/cn.ts
import { type ClassValue, clsx } from "clsx";import { twMerge } from "tailwind-merge";export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs));}
components/background-gradient/dark-carbon-spotlight-background.tsx
import { forwardRef, type HTMLAttributes, type ReactNode } from "react";import { cn } from "@/lib/cn";export interface DarkCarbonSpotlightBackgroundProps extends HTMLAttributes<HTMLDivElement> {children?: ReactNode;}const DarkCarbonSpotlightBackground = forwardRef<HTMLDivElement,DarkCarbonSpotlightBackgroundProps>(({ children, className, ...props }, ref) => {return (<divref={ref}data-slot="dark-carbon-spotlight-background"className={cn("relative isolate overflow-hidden bg-[#0C0C0C]", className)}{...props}><divaria-hidden="true"className="pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(circle_at_50%_12%,#1C1C1C_0%,#121212_36%,#0C0C0C_68%,#050505_100%)]"/><divaria-hidden="true"className="pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(circle_at_50%_0%,rgba(255,255,255,0.14)_0%,transparent_46%)] opacity-50"/><divaria-hidden="true"className="pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(circle_at_center,transparent_42%,rgba(0,0,0,0.55)_100%)]"/><divaria-hidden="true"className="pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(circle_at_center,rgba(255,255,255,0.7)_1px,transparent_1px)] [background-size:4px_4px] opacity-[0.03]"/>{children}</div>);});DarkCarbonSpotlightBackground.displayName = "DarkCarbonSpotlightBackground";export { DarkCarbonSpotlightBackground };