Contribution Truck
A crisp SVG pixel-art freight cab paired with an ISO container cargo chassis that frames any GitHub-style contribution matrix or telemetry grid, complete with subtle cab suspension and exhaust wisps.
JanFebMarAprMayJunJulAugSep
Sample matrix (36 wks)Hover truck cab
Interactive Controls
36
showMonths
Installation
Zero external dependencies — drop the source files directly into your project.
Props API
| Prop | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode | required | Content rendered inside the ribbed ISO shipping container payload bay. |
- Built purely with crispEdges inline SVG geometry and scoped CSS module keyframes — zero external image files.
- Adapts container trim, corner castings, and chassis shadows cleanly between light and dark themes.
- Suspends exhaust animation under prefers-reduced-motion.
Source Files
"use client";
import { type ReactNode, useEffect, useId, useRef, useState } from "react";
import { useUISound } from "@/context/SoundContext";
import {
createTruckHornAudio,
type TruckHornAudioAdapter,
} from "@/lib/truckHornAudio";
import styles from "./ContributionTruck.module.css";
function CabSVG({
isHonking,
honkNonce,
}: {
isHonking: boolean;
honkNonce: number;
}) {
const clipId = useId();
const beamGradId = useId();
return (
<svg
viewBox="0 0 185 305"
fill="none"
focusable="false"