Loading component…
Loading component…
A blurred colour gradient glowing up from the bottom edge, with two layers that drift and morph
To reuse this local React demo, copy all files from the Code tab into the same folder, then import GradientFloor from ./gradient-floor.
import { GradientFloor } from "@/components/ui/gradient-floor";
export function Hero() {
return (
// Give the floor a height, e.g. with a class
<GradientFloor className="hero">
<h1>Ideas start to glow</h1>
</GradientFloor>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | Content rendered above the floor | |
| colors | [string, string, string] | ["#FF7700", "#FF0055", "#0073FF"] | Gradient from the crest down |
| speed | number | 3 | Seconds per morph loop; 0 keeps the shape still |
| className | string | Extra class on the root, e.g. for height or rounded corners |
Scales with the width of its container and stays anchored to the bottom edge – give the root a height
Set the background with --ui-gf-bg (default #fafafa, dark mode #111113)