Rain for moody backgrounds and weather apps: streaks fall at the wind's angle and splash at the bottom. Amount, wind, speed, splashes and colour come from data.
Every control here is a view model input in the file. Your app sets the same ones.
Pick your format
Free for your projects, personal or commercial. Don't resell the file itself.
Get the .rivFree. Sent to your inbox, ready to drop in.
How it's built
- 1One script, no keyframesEvery particle is a few numbers the script updates and draws each frame.
- 2Inputs, not code editsAmount, Wind, Speed, Drop size, Splashes, Rain: all view model inputs.
- 3Transparent on purposeThe artboard has no background, so it sits on top of your own design.
Use it on your site
import { useRive } from '@rive-app/react-canvas';
export function Rain() {
const { rive, RiveComponent } = useRive({
src: '/rain.riv',
artboard: 'Rain',
stateMachines: 'State Machine',
autoplay: true,
autoBind: true,
});
// every input on this page is a view model property
const vm = rive?.viewModelInstance;
if (vm) vm.color('color').value = 0xFFAACDF5;
return <RiveComponent style={{ width: '100%', height: 400 }} />;
}Inputs: amount, wind, speed, scale, splashes, color. All on the Rain view model.