Floating Hearts

ParticlesNode ScriptFree← PrevNext →

Floating hearts for likes, love and reactions: hearts rise with a sway and fade out near the top. Amount, speed, size, sway and three colours come from data.

Live
Tap for a burst

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.

Free. Unsubscribe anytime.

How it's built

  1. 1
    One script, no keyframesEvery particle is a few numbers the script updates and draws each frame.
  2. 2
    Inputs, not code editsAmount, Speed, Size, Sway, Colour 1, Colour 2, Colour 3: all view model inputs.
  3. 3
    Transparent 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 FloatingHearts() {
  const { rive, RiveComponent } = useRive({
    src: '/floating-hearts.riv',
    artboard: 'Floating Hearts',
    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('color1').value = 0xFFFF4B6E;

  return <RiveComponent style={{ width: '100%', height: 400 }} />;
}

Inputs: amount, speed, scale, sway, color1, color2, color3. All on the FloatingHearts view model.

More particles

See all →