boid-flock
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

Boid Flock

A React component to render a boids simulation anywhere

Demo gif

Installation

npm add 'boid-flock'

Usage

import { BoidFlock } from "boid-flock";

export function YourComponent() {
  return (
    <BoidFlock>
      <span>You can render whatever you like in here</span>
    </BoidFlock>
  );
}

Optionally you can pass a boidCount prop to the component to control the number of boids rendered.

import { BoidFlock } from "boid-flock";

export function YourComponent() {
  return (
    <BoidFlock boidCount={3}>
      <p>There's only 3 boids in my background</p>
    </BoidFlock>
  );
}

Dependencies (0)

    Dev Dependencies (25)

    Package Sidebar

    Install

    npm i boid-flock

    Weekly Downloads

    10

    Version

    1.4.2

    License

    ISC

    Unpacked Size

    14.2 kB

    Total Files

    14

    Last publish

    Collaborators

    • fildon