This page as markdown: /gradient-art.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

GradientArt

Status: beta

Placeholder artwork painted by a static WebGL shader from the preset's own art direction (the --art-* tokens: palette, ground, warp, softness, grain) — Ember burns, Prism airbrushes, Meridian is grainy monochrome — with a CSS gradient underneath for prerendered pages and browsers without WebGL2.

Keywords: gradient, mesh gradient, grain, shader, artwork, placeholder image, cover, banner, avatar fallback, generative

Usage

Use GradientArt where a real image belongs but none exists yet, or where the image is decoration: a product cover before upload, a profile banner, an album tile, an avatar with no photo. It reads the theme's own tokens, so it follows every preset, mode and live edit; seed fixes each item's composition so a list of covers or avatars stays individually recognisable. intensity="soft" paints the same art as a pastel wash — the iridescent aura AI products use as a card or modal header band, and as a stage for floating chips and logo tiles.

Best practices

Props

Name Type Default Description
variant "mesh" | "grain" | "linear" "mesh" mesh: soft spots of colour pulled together by gentle waves. grain: glowing light over deep corners with a printed texture. linear: two vivid neighbouring colours in a plain CSS gradient, for avatar and icon sizes; it loads no shader, and takes overlay ink for short initials.
tones ("info" | "3" | "2" | "1" | "warning")[] — Paint these --tone-* colours instead of the preset's art palette. Leave unset to follow the preset's art direction.
seed string | number — Fixes the composition: the same seed paints the same art in every theme. Pass a stable id.
intensity "vivid" | "soft" "vivid" vivid: the preset's art at full strength. soft: every colour and the ground lifted to a light pastel of itself (high lightness, half chroma) — a wash for header bands and for staging chips and logo tiles, light in both modes.
children ReactNode — Rendered above the art — initials, a glyph, a short label.
className string — Size and shape: aspect, height, rounding.

Variants

Tokens used

art-1, art-2, art-3, art-4, art-5, art-6, art-ground, art-warp, art-softness, art-grain, primary, tone-info, tone-3, tone-2, tone-1, tone-warning

Motion

Accessibility

Related

Examples

Product cover

import { GradientArt } from "@sableui/react"

<GradientArt seed="Untitled (gold rush)" className="aspect-[4/3] rounded-lg" />

Grain banner

import { GradientArt } from "@sableui/react"

<GradientArt variant="grain" seed="juno" tones={["info", "1"]} className="h-20 rounded-md" />

Avatar with initials

import { GradientArt } from "@sableui/react"

<GradientArt variant="linear" seed="Mara Okafor" className="grid size-10 place-items-center rounded-full text-label-md text-overlay-foreground">MO</GradientArt>

Soft header band with logo tiles

import { Button, Card, CardDescription, CardFooter, CardHeader, CardTitle, GradientArt, Icon } from "@sableui/react"

<Card className="w-full max-w-sm">
	<GradientArt intensity="soft" seed="Integrations" className="flex h-32 items-center justify-center gap-3 rounded-t-lg">
		{["mail", "calendar", "chart"].map((name) => (
			<span key={name} className="grid size-12 place-items-center rounded-lg border border-border-floating bg-popover text-popover-foreground shadow-md">
				<Icon name={name} className="text-xl" />
			</span>
		))}
	</GradientArt>
	<CardHeader>
		<CardTitle>Connect your tools</CardTitle>
		<CardDescription>Bring mail, calendar and analytics into one place.</CardDescription>
	</CardHeader>
	<CardFooter>
		<Button>Connect</Button>
	</CardFooter>
</Card>