UNPKG

react-snow-overlay

Version:

A performant snowfall effect for your website using canvas and web workers

29 lines (22 loc) 778 B
import { FC } from 'react'; export declare const DEFAULT_SNOW_OPTIONS: Readonly<{ readonly color: "rgba(255, 255, 255, 0.8)"; readonly maxParticles: 50; readonly speed: "DEFAULT"; }>; export declare const SNOW_OPTIONS_SPEED_MAP: Record<Extract<SnowOptions['speed'], string>, number>; declare interface SnowOptions { color: CanvasFillStrokeStyles['fillStyle']; maxParticles: number; speed: 'DEFAULT' | 'FAST' | 'FASTER' | { speed: 'custom'; msBetweenUpdates: number; }; } export declare const SnowOverlay: FC<SnowOverlayProps>; export declare interface SnowOverlayProps extends Partial<SnowOptions> { zIndex?: number; disabled?: boolean; disabledOnSingleCpuDevices?: boolean; } export { }