Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/paper-design/shaders/llms.txt

Use this file to discover all available pages before exploring further.

Up to 20 colored gooey blobs orbit the canvas center and merge into smooth organic shapes through an implicit surface technique. Each ball is independently animated with noise-driven motion. Supports up to 8 colors distributed across the balls.

Usage

import { Metaballs } from '@paper-design/shaders-react';

export default function Example() {
  return (
    <Metaballs
      colorBack="#000000"
      colors={['#6e33cc', '#ff5500', '#ffc105', '#ffc800', '#f585ff']}
      count={10}
      size={0.83}
      speed={1}
      style={{ width: '100%', height: '100%' }}
    />
  );
}

Props

colorBack
string
default:"#000000"
Background color behind the metaballs.
colors
string[]
Array of up to 8 colors distributed across the blobs.
count
number
default:"10"
Number of blobs. Range: 1 to 20.
size
number
default:"0.83"
Size of the blobs. Higher values produce larger, more merged shapes. Range: 0 to 1.
speed
number
default:"1"
Animation speed multiplier. Set to 0 to pause.
frame
number
default:"0"
Static frame position when speed is 0.

Presets

NameDescription
DefaultMulti-color blobs on black
Ink DropsSmall black drops on transparent background
SolarOrange and gold blobs on deep blue
BackgroundLarge soft blobs for a full-bleed background

Sizing

This shader uses ShaderSizingParams. See Sizing and fit for fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, and worldHeight props.