Socket
Book a DemoInstallSign in
Socket

@kawarp/react

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kawarp/react

React component for Kawarp fluid animated backgrounds

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

@kawarp/react

React component for Kawarp fluid animated backgrounds.

Installation

npm install @kawarp/react

Usage

import { Kawarp } from '@kawarp/react';

function App() {
  return (
    <Kawarp
      src="/album-art.jpg"
      style={{ width: '100%', height: '100vh' }}
    />
  );
}

With Hook

For operations that can't be done via props (loading from files, blobs, or gradients), use the useKawarp hook:

import { Kawarp, useKawarp } from '@kawarp/react';

function App() {
  const { ref, loadImage, loadBlob } = useKawarp();

  const handleFileUpload = async (file) => {
    await loadBlob(file);
  };

  return (
    <>
      <Kawarp ref={ref} src="/initial.jpg" style={{ width: '100%', height: '100vh' }} />
      <input type="file" onChange={(e) => handleFileUpload(e.target.files[0])} />
    </>
  );
}

Props

PropTypeDefaultDescription
srcstring-Image URL (auto-loads on change)
autoPlaybooleantrueAuto-start animation
onLoadfunction-Callback when image loads
onErrorfunction-Callback on error
classNamestring-Container class name
styleCSSProperties-Container styles
warpIntensitynumber1.0Warp effect strength (0-1)
blurPassesnumber8Kawase blur passes (1-40)
animationSpeednumber1.0Animation speed multiplier
transitionDurationnumber1000Crossfade duration in ms
saturationnumber1.5Color saturation multiplier
tintColor[r, g, b][0.16, 0.16, 0.24]Tint color for dark areas (0-1)
tintIntensitynumber0.15Tint effect strength (0-1)
ditheringnumber0.008Dithering strength (0-0.1)
scalenumber1.0Overall zoom level of the effect (0.01-4)

License

AGPL-3.0

Built by Better Lyrics

Keywords

react

FAQs

Package last updated on 29 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts