GitHub 560+

Gradient

Decorative masked gradient overlays for sections, cards, and media.

Section background

A soft radial gradient anchored to the bottom edge.

Installation

npx shadcn@latest add @fulldev/gradient

Usage

import { Gradient } from "@/components/ui/gradient"
<div class="relative overflow-hidden">
  <Gradient />
  <div class="relative z-10">
    <!-- Content -->
  </div>
</div>

The component renders an absolutely positioned decorative layer. Place it in a relative parent and keep foreground content above it with normal stacking.

Examples

Linear

Use variant="linear" for edge fades and image overlays.

Linear overlay

Useful when content needs more contrast over media.

Direction

Control where the gradient is anchored with direction.

Left
Right

Custom Stops

Override --gradient-stops and background color to shape the mask.

Center glow

API Reference

Gradient

Use Gradient to add a non-interactive decorative gradient layer.

PropTypeDefault
variant"radial" | "linear""radial"
direction"left" | "right" | "top" | "bottom" | "center""bottom"
classstring

See the GitHub source code for more information on props.