v2.0.0
Interactive gradient mesh

Mesh as a background, not a thin strip

Give the effect real surface area, a strong foreground card, and a slow ambient drift so the mesh reads without turning the preview into a busy light show.

  • Motion budget 48s cycle
  • Pointer mode interactive
  • Fallback static

Launch board

The mesh needs a real foreground composition so the color fields read behind content.

Cursor chase

Interactive mode pulls the highlight toward the pointer instead of staying flat.

Reduced motion

Animation already backs off when the browser asks for less movement.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { GradientMesh } from '@dryui/ui';
</script>

<GradientMesh>Content</GradientMesh>

Import options

Root package

ts
import { GradientMesh } from '@dryui/ui'

Per-component subpath

ts
import { GradientMesh } from '@dryui/ui/gradient-mesh'

API

Props, CSS variables, and the public data attributes you can target when styling.

Prop Type Description Default Required Bindable
colors
readonly [string, string, string, string]
['#7b68ee'
speed
slownormalfast
'normal'
interactive
boolean
false
children
Snippet
Content rendered inside the component.