my/ui

Command Palette

Search for a command to run...

All components

Night Fade

gradients

A "Night Fade" CSS gradient.

responsive · 600px

Install

Same command in any shadcn project — React (Vite/CRA), Next.js, Remix, Astro, and more:

$npx shadcn@latest add https://your-domain/r/gradient-night-fade.json

Usage

import { GradientNightFade } from "@/registry/gradients/night-fade";

export default function Demo() {
  return <GradientNightFade />;
}

Component source

import * as React from "react";
import { cn } from "@/lib/utils";

/** "Night Fade" gradient. */
export const GradientNightFade_CSS = "linear-gradient(0deg, #a18cd1 0%, #fbc2eb 100%)";

export function GradientNightFade({ className, style, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      className={cn("h-40 w-full rounded-xl", className)}
      style={{ backgroundImage: "linear-gradient(0deg, #a18cd1 0%, #fbc2eb 100%)", ...style }}
      {...props}
    />
  );
}

Source: WebGradients