Grainy Background

A dynamic animated gradient background component that supports various grainy effects and patterns.

Six animations. Six grains. Infinite combos.

Animated mesh gradients with film-grain textures. Mix and match animation styles and grain types for unique backgrounds.

Aurora · Plasma
Grainy gradients

Animated mesh backgrounds with film-grain textures.

Mesh
Paper

Soft fibrous texture.

Dust
Pulse

Breathing concentric rings.

Noise
Waves

Rolling horizontal bands.

Scratches
Spiral

Counter-rotating spirals.

Digital
Flow

Drifting radial blobs.

Mesh · Digital
Blend modes

Connected mesh nodes.

Installation

Usage

import { GrainyBackground } from "@/components/ui/grainy-background";
<div className="relative h-[500px] w-full overflow-hidden bg-transparent">
  <div className="absolute inset-0">
    <GrainyBackground
      position="absolute"
      colors={["#3b82f6", "#2563eb", "#1d4ed8", "#1e40af"]}
    />
  </div>
  <div className="relative z-10 flex h-full items-center justify-center text-white">
    <div className="p-4 text-center">Animated Background</div>
  </div>
</div>

Props

PropTypeDefaultDescription
childrenReact.ReactNodeundefinedContent to render on top of the gradient background.
classNamestringundefinedAdditional CSS classes to apply to the container.
styleReact.CSSPropertiesundefinedInline styles to apply to the container.
colorsstring[]Auto-selected based on darkModeArray of colors to use in the gradient pattern.
speednumber1Speed factor for the gradient animation (higher = faster).
grainTypestring"digital"Type of grain texture effect: digital (sharp pixelated), plasma (organic flowing), scratches (linear streaks), paper (smooth textured), noise (fine random), dust (scattered particles).
grainIntensitynumber60Intensity of the grain effect (0-100).
grainSizenumber100Size of the grain particles.
animationTypestring"mesh"Animation pattern effect: flow (smooth directional), mesh (interconnected nodes), waves (rhythmic undulation), aurora (curtain-like movement), spiral (circular rotation), pulse (concentric expansion).
size"sm" | "md" | "lg" | "full" | number"full"Size of the background container. Numbers represent pixels.
positionstring"relative"CSS position property for the background container.
zIndexnumber0z-index of the background container.
animatebooleantrueEnable or disable background animation.
darkModebooleanfalseEnable dark mode styling and default colors.
asstring"div"HTML element to render as the container.
grainBlendModestring"soft-light"CSS blend mode effect for grain layer: multiply (darkens), overlay (contrast), soft-light (gentle), hard-light (intense), screen (brightens), color-burn (dramatic), normal (standard).

Examples

Hero Section

Start building today.

Install the registry, pick a component, ship it. No setup, no config, no friction.

Pricing Cards

Pricing

Build like a Studio.

Ship with confidence.

Pick your stack. Start building products you're proud to launch.

Web Studio

Get access to React library components and features

$299

Perpetual license

Pro React components

Premium templates

Pro AI (Skills and MCPs)

500 AI credits included

Premium design systems

Pro design systems

Private Discord channel

Prioritized issues

Priority support

Optional updates renewal at $99/yr

Get another year of updates, or keep using your current version. No pressure.

Mobile Studio

Get access to React Native library components and features

$299

Perpetual license

Pro React Native components

Premium templates

Pro AI (Skills and MCPs)

500 AI credits included

Premium design systems

Pro design systems

Private Discord channel

Prioritized issues

Priority support

Optional updates renewal at $99/yr

Get another year of updates, or keep using your current version. No pressure.

Save $199 with the bundle

Studio Pro

The full system. React and React Native, together

$399

Perpetual license

All Pro components (React + React Native)

Premium templates

Pro AI (Skills and MCPs)

1000 AI credits included

Premium design systems

Pro design systems

Private Discord channels

Prioritized issues

Priority support

Optional updates renewal at $129/yr

Get another year of updates, or keep using your current version. No pressure.

Note:If you're a NyxUI v2 Pro customer, you're eligible for an upgrade discount, use the same email address or contact us support@nyxui.com

Looking for NyxUI Pro v2? Go to v2 →