Skip to Content

Two-Tone Gradient

Two-color gradient background: a painted vertical gradient from a high and a low OKLCH color, with blooms and a vignette that follow them and optional grain. Defaults to cream, amber, magenta and warm dark; crops to a set aspect.

Installation

pnpm dlx shadcn@latest add @01orbital/two-tone-gradient

Usage

import { TwoToneGradient } from "@/components/scene/two-tone-gradient"

export default function Example() {
  return <TwoToneGradient />
}

Examples

Amber To Chartreusetwo-tone-gradient-amber-to-chartreuse

Two Tone Gradient example at full brightness: amber at the top, a hard red band through the middle, then yellow into chartreuse and an olive foot, with the scene's own grain.

pnpm dlx shadcn@latest add @01orbital/two-tone-gradient-amber-to-chartreuse

Bronze Dusktwo-tone-gradient-bronze-dusk

Two Tone Gradient example: a muted bronze at the top falling through rust, crimson and a thin violet band into near-black, with the scene's own grain.

pnpm dlx shadcn@latest add @01orbital/two-tone-gradient-bronze-dusk

Orchid Dusktwo-tone-gradient-orchid-dusk

Two Tone Gradient example: a muted orchid at the top falling through violet and indigo into near-black, with the scene's own grain.

pnpm dlx shadcn@latest add @01orbital/two-tone-gradient-orchid-dusk

API reference

A painted vertical gradient from two OKLCH colors, a high and a low: every stop, both blooms and the vignette are worked out from them, with an optional grain on top. The defaults walk cream, amber, magenta and warm dark. It fills its parent and cover-crops the composition to crop.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Last updated on