datui
Color scheme

Layout

Gradient

Background fade block toward the top or bottom.

import { Gradient } from "datui";

Playground

<Gradient variant="default" to="top" />

Examples

Variants

Caption

Accessibility

  • Purely decorative, no role. Text on the overlay variant must keep sufficient contrast.

API

Gradient

Background fade block, e.g. behind content over an image. Purely decorative; text on `overlay` must keep contrast.

PropTypeDefaultDescription
classNamestring—
to"top" | "bottom"—Direction the gradient fades toward (its transparent end).
variant"default" | "tint" | "overlay"—`default` fades the page background, `tint` the secondary background, `overlay` a dark scrim.