Boat loaders

Four more ways to wait with the boat: rocking on a sliding sea, being built piece by piece, a fleet of three taking turns, and a crossing that fills a line. CSS only.

Options

Size
Colour

Code

import "./boat-loaders.css";

const inside = {
  swell: (
    <>
      <i className="dh-sail-boat" aria-hidden="true" />
      <span className="dh-sail-sea" aria-hidden="true" />
    </>
  ),
  build: (
    <span className="dh-sail-kit" aria-hidden="true">
      <i className="dh-sail-hull" />
      <i className="dh-sail-mast" />
      <i className="dh-sail-jib" />
      <i className="dh-sail-main" />
    </span>
  ),
  fleet: (
    <>
      <i className="dh-sail-boat" aria-hidden="true" />
      <i className="dh-sail-boat" aria-hidden="true" />
      <i className="dh-sail-boat" aria-hidden="true" />
    </>
  ),
  voyage: (
    <span className="dh-sail-route" aria-hidden="true">
      <i className="dh-sail-boat" />
    </span>
  ),
};

/* kind is "swell", "build", "fleet" or "voyage". Its size follows the font size around it. */
export function BoatLoader({ kind = "swell", label = "Loading" }) {
  return (
    <div className={"dh-sail dh-sail--" + kind} role="status" aria-label={label}>
      {inside[kind]}
    </div>
  );
}