Fork me on GitHub

Funnies

A flexible way to add funny loading messages to webapps with optional react support.

  Contribute your own funny message!

Vanilla Javascript

Minimal usage

...

Code:

import Funnies from 'funnies';
let funnies = new Funnies();
funnies.message(); // "Bending the spoon..."
        

Add your own custom messages:

...

Code:

import Funnies from 'funnies';
let funnies = new Funnies([
  "foo",
  "bar",
  "baz",
  "hello",
  "world",
]);
funnies.message(); // "baz"
        

React

The funnies react component is a drop-in solution to create a simple loading indicator. To keep users interested, the loading message is periodically refreshed (or if you'd rather, this can be turned off.)

Props:

Minimal Usage

Code:

import FunniesComponent from 'funnies/react';
ReactDOM.render(<FunniesComponent />, elem);
        

Live-Updating Interval