OpenSourceUIOpenSourceUIOpensource UI
GitHub—
  1. Home
  2. Components
  3. Background-gradient
  4. Sunrise Horizon
Back to Background-gradientComponents / Background-gradient

Sunrise Horizon

Free Background-gradient React component — SunriseHorizonBackground. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.

Warm dawn sky with peach horizon bands, a soft sun glow, and cool teal lift at the base — editorial hero sections and landing pages.

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. 1

    Run in your terminal:

    $npm install clsx tailwind-merge lucide-react
  2. 2

    Copy lib/cn.ts below. Skip if you already have cn().

  3. 3

    Copy the code below and create components/background-gradient/sunrise-horizon-background.tsx in your project.

  4. 4

    Import and render:

    Example

    import { SunriseHorizonBackground } from "@/components/background-gradient/sunrise-horizon-background";

    <SunriseHorizonBackground className="min-h-screen p-8"><h1>Morning</h1></SunriseHorizonBackground>

lib/cn.ts

1
2
3
4
5
6
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
 
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

components/background-gradient/sunrise-horizon-background.tsx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { forwardRef, type HTMLAttributes, type ReactNode } from "react";
 
import { cn } from "@/lib/cn";
 
export interface SunriseHorizonBackgroundProps extends HTMLAttributes<HTMLDivElement> {
children?: ReactNode;
}
 
const SunriseHorizonBackground = forwardRef<
HTMLDivElement,
SunriseHorizonBackgroundProps
>(({ children, className, ...props }, ref) => {
return (
<div
ref={ref}
data-slot="sunrise-horizon-background"
className={cn("relative isolate overflow-hidden bg-[#FFF8F3]", className)}
{...props}
>
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 -z-10 bg-[linear-gradient(180deg,#FFF8F3_0%,#FFE8D8_42%,#FFD9C8_68%,#C8E8EE_100%)]"
/>
 
<div
aria-hidden="true"
className="pointer-events-none absolute -z-10 blur-2xl"
>
<div className="absolute bottom-[8%] -left-[15%] h-[55%] w-[70%] rounded-[100%] bg-[#FFB38A] opacity-55" />
<div className="absolute bottom-[12%] left-[28%] h-[42%] w-[48%] rounded-[100%] bg-[#FF8F6B] opacity-45" />
<div className="absolute -right-[10%] bottom-[6%] h-[50%] w-[58%] rounded-[100%] bg-[#7DD3C7] opacity-40" />
</div>
 
<div
aria-hidden="true"
className="pointer-events-none absolute bottom-[22%] left-1/2 -z-10 h-28 w-28 -translate-x-1/2 rounded-full bg-[#FFF1DC] opacity-90 blur-md"
/>
 
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(circle_at_center,#000_1px,transparent_1px)] [background-size:5px_5px] opacity-[0.04]"
/>
 
{children}
</div>
);
});
 
SunriseHorizonBackground.displayName = "SunriseHorizonBackground";
 
export { SunriseHorizonBackground };
PreviousNext

On this

page

Jump to a section on this page.

  • lib/cn.ts
  • components/background-gradient/sunrise-horizon-background.tsx
Platinum slotAvailable

Feature your product here.

Sticky card next to every component — highest-intent placement.

Claim this card