A reusable React component built with TypeScript
npm install animated-dark-background!Demo
A highly customizable, animated dark background React component built with TypeScript and WebGL (OGL). Perfect for adding a visually appealing animated effect to your app or landing page.
``bash`
npm install animated-dark-background
or
`bash`
yarn add animated-dark-background
`tsx
import DarkBackground from 'animated-dark-background';
import 'animated-dark-background/dist/DarkBackground.css';
function App() {
return (
Props
| Prop | Type | Default | Description |
|---------------------|---------|---------|-------------|
| hueShift | number | 0 | Shifts the hue of the background colors |
| noiseIntensity | number | 0 | Amount of noise overlay |
| scanlineIntensity | number | 0 | Intensity of scanline effect |
| speed | number | 0.5 | Animation speed |
| scanlineFrequency | number | 0 | Frequency of scanlines |
| warpAmount | number | 0 | Amount of warping effect |
| resolutionScale | number | 1 | Scale the rendering resolution |Styling
The component uses a canvas with the class darkveil-canvas`. You can override its style in your CSS if needed.---
For more details, see the GitHub repository.