Layout
Gradient
Background fade block toward the top or bottom.
import { Gradient } from "datui";Playground
<Gradient variant="default" to="top" />Examples
Variants
Accessibility
- Purely decorative, no role. Text on the
overlayvariant must keep sufficient contrast.
API
Gradient
Background fade block, e.g. behind content over an image. Purely decorative; text on `overlay` must keep contrast.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| 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. |