026
AI ready Refreshed

Food Truck Template

£15 View live demo or the whole Vault, £79.20

Includes the original v1 design as a separate download.

A one-page food truck website built around this week's pitches: seven tear-off tickets on a real street map, a hatch board of cut-out dishes and a catering quote that stacks trays. Suits street-food vans, coffee carts, pop-ups and market traders.

ScrollTriggerDraggableMotionPathPlugin Lenis intermediate
12 more details
load-sequencescroll-revealstaggermarqueemotion-pathdraggabletouch-dragkeyboard-navigationhover-effectelasticvalue-transitionprogressive-enhancement

Updated

About this template

A one-page site for a street-food van, painted like the van's own signwriting: a butter-yellow ground, cobalt ink and one hot pink, with a striped awning that unrolls from the nav and hangs over each section's edge. The worked example is Big Tin Tacos in Cardiff, and the hero is the van itself, a pink corrugated Citroën H cut out at scale and parked under a headline that fills the width.

Read the full template overview

The page is organised around the question every food truck site has to answer: where are you today? The This week section is a strip of seven paper tickets, one per day, with today already picked. Choosing a day tears its stub along the perforation, stamps the pitch card and flies a real OpenStreetMap map of the city to that pitch, while a little van drives along the strip to the ticket. The same seven tickets set the live chip in the hero (open now, opening later, or the next pitch), the week's dates and the footer hours, all in the van's own time zone.

Around it: a cobalt hatch board where each dish lifts its cut-out photograph onto wrapper paper with a swinging price ticket and dietary chips dim what does not fit; a hot-pink catering block where a guest slider recomputes the per-head rate and stacks foil trays; and a draggable sticker wall of markets and street parties on a ruled colour-block grid. Change four colours, the seven tickets and the photographs, and it becomes a coffee cart, a burger van or a weekly market stall. There is no build step.

Food Truck Template - website template preview

What's included

12 items
  • Complete one-page site: awning nav, cut-out van hero, hatch board menu, weekly pitch schedule with a real map, catering quote and enquiry form, sticker wall, follow and footer
  • This week: seven tear-off tickets as a keyboard radiogroup, today picked on load; a pick tears the stub, stamps the card, moves a small van along the strip and flies the map to the pitch
  • Real street map on MapLibre GL and OpenFreeMap tiles: no API key, pins on real Cardiff streets, cooperative gestures so the page still scrolls, loaded only as the section approaches
  • One schedule, many readers: the hero's open-now chip, the week's dates, past and today states and the footer hours all come from the seven tickets, in Europe/London time
  • Hatch board menu: each dish lifts its transparent cut-out photograph onto wrapper paper with a pinned price ticket; veggie, vegan, gluten-free and hot chips dim the rest of the board
  • Catering quote: a guest slider picks the per-head band, applies the minimum spend, and stacks one foil tray per fifteen guests beside the photo; the enquiry form takes the number
  • Seen at: event stickers on a ruled colour-block grid that drag with Draggable or move with the arrow keys
  • A cut-out van photograph recoloured to the brand in its paint only, with the tin-can roundel decal as an SVG you can move or swap
  • Four-colour token block with measured contrast pairs; the awning, torn edges and mark recolour from the same tokens
  • Without JavaScript all seven days read as tickets with full addresses and notes, the whole board and its prices show, and the map is a link to OpenStreetMap
  • Reduced motion keeps every control working: the picks, filter, slider and stickers change state instantly with no tearing, flying or stacking
  • Lenis smooth scrolling wired in and optional

Perfect for

5 use cases
  • Food trucks, taco and burger vans, and any street-food business that moves between pitches
  • Coffee carts, ice-cream vans and mobile bars with a weekly round
  • Market traders and pop-up stalls that need a where-are-we-this-week page
  • Street-food caterers taking event and wedding enquiries
  • Learning a schedule-driven GSAP page: one data source feeding several animated surfaces

How it works

6 sections

Structure

One script sets up each section with its own guarded initialiser inside a single GSAP context, so the menu, the week, catering or the sticker wall can be deleted and the rest still runs. Reveal start states sit behind a has-js class added in the head, and the class is removed again if the GSAP CDN fails, so a blocked script leaves a plain, complete page.

The weekly schedule

Each ticket carries its day, opening and closing times and coordinates as data attributes. On load the script reads them once, works out the current time in Cardiff, dates every ticket for the current week, marks the days already gone and writes the live chip in the hero and the today marker in the footer. A once-a-minute check keeps those states current while the page stays open.

Picking a day

The tickets form a radiogroup with roving focus, so arrow keys, Home and End move between days. A pick swings the stub away along its perforation, stamps the pitch card, flies the map to that pin and drives a small van along a dotted road above the strip with MotionPathPlugin. On narrow screens the strip becomes a swipeable row and the road is hidden.

The map

MapLibre GL and its stylesheet are loaded only when the section approaches, then the light OpenFreeMap style is tinted towards the page colours. Pins are plain DOM markers that also select their day. Cooperative gestures keep wheel and one-finger touch scrolling the page; without WebGL or a connection the container keeps its link to the pitches on OpenStreetMap.

Menu and catering

Board rows are toggle buttons; the matching cut-out rises onto the wrapper paper and its price ticket swings on a pin, and the dietary chips dim rows and sides by their tags, moving the pick to the first dish that still fits. The catering slider reads its per-head bands and minimum spend from a data attribute, so pricing changes are an edit to one line of markup.

Accessibility and reduced motion

Every interaction has a keyboard path: dishes and chips are buttons, the week is a radiogroup, and stickers move with the arrow keys. Reduced motion skips the intro, tearing, map flights and tray drops but keeps every state change, and Lenis is never started. Decorative artwork such as the awning, the mark and the map pins is hidden from assistive technology because the same information is in the text.

Plugins ScrollTrigger, Draggable, MotionPathPlugin
Difficulty Intermediate
Smooth scroll Lenis integration
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Lighthouse, as measured

Google Lighthouse on this template's demo, from the latest scan. A measurement of the demo as shipped, not a promise for your page.

Accessibility
100
Best practices
100

No performance score, on purpose. That figure depends on how you deploy: your server's compression and caching, your CDN, the connection and the device doing the test, none of which the code controls. The same page can score very differently on two consecutive runs, so measure it where it will live.

Questions about this template

Which businesses does this design suit besides a taco van?

Anything with a weekly round of pitches: burger and pizza vans, coffee carts, ice-cream vans, mobile bars, market stalls and pop-ups. The page is organised around where you are this week, so swap the van photograph, the seven tickets, the dishes and four colour values and it reads as your business rather than a taco van.

How do I change the pitches and opening times each week?

Edit the seven tickets in the This week section: each has its day, opening and closing time and longitude,latitude as data attributes, plus the pitch name, address and note as text. The hero chip, the week's dates, the map pins and the footer today marker all read those tickets, so there is one place to edit. There is no feed or backend.

Does the map need an API key or a paid account?

No. It uses MapLibre GL with OpenFreeMap tiles, which are OpenStreetMap data with no key, no account and commercial use allowed. Put your own coordinates on the tickets and the pins follow. The OpenStreetMap attribution has to stay visible, folded to its small info button by default.

Can I use my own van and food photographs as cut-outs?

Yes. The van and dishes are transparent WebP files, so any photo with its background removed in a tool of your choice drops in at the same file names. Ordinary rectangular photos also work on the wrapper paper. The included key script shows how the demo cut-outs were made, but you do not need it.

Does the catering enquiry form send anything?

No, it is a static front end. It collects name, email, date, guest count, postcode, occasion and a message, validates the required fields and shows a thank-you line. Point it at Formspree, Netlify Forms or your booking system by setting the form's action and removing the line that stops submission. The newsletter sign-up works the same way.

How do I change the catering prices and the tray maths?

The per-head bands and the minimum spend live in one data attribute on the quote panel as a short list of maximum guests and rate, so a price change is a markup edit. Guests per tray and the number of trays drawn before a plus label appears are two constants at the top of the catering code.

Paid template

Purchase to unlock the code.

Buying Food Truck Template opens the HTML, CSS and JavaScript source, the full documentation, an AI setup prompt for your editor, and every update we ship to it. Standard license: unlimited personal and commercial projects. Every paid product is tested for desktop and mobile layouts, reduced-motion handling, animation cleanup and keyboard controls wherever there is something to operate.

£15 Standard license, unlimited projects

Browse free effects

Or the whole library: the Vault, £79.20, one payment.

Documentation

Quick Start

  1. Unzip and open index.html in a browser, or upload the folder to any static host. There is no build step.
  2. Replace the seven tickets in the This week section with your own pitches (see below). The hero chip, the week's dates, the map pins and the footer's today marker update from them.
  3. Swap assets/img/van.webp for your own van and the dish-*.webp cut-outs for your food.
  4. Repaint the four colour tokens at the top of assets/style.css.

Using It With Your Own Design

Everything is plain HTML, CSS and one script. Each section is a self-contained block in index.html with its own initialiser in assets/script.js, and every initialiser returns early when its markup is missing, so you can delete the menu, catering, the sticker wall or the map and the rest keeps working.

The behaviour hooks are data- attributes (data-tickets, data-board, data-guests, data-wall and so on); class names are only for styling. To restyle, change the tokens first, then the section rules in style.css. Fonts are Lilita One (display), Yellowtail (script, used three times) and Gantari (body), self-hosted from assets/fonts/ with only the weights used (see Fonts below).

Files

File What it is
index.html The whole site, including the SVG awning, torn edge, mark and small van artwork
assets/style.css Tokens, layout, section styles, reveal gates and the reduced-motion overrides
assets/script.js Readable source
assets/script.min.js Minified copy of the same script; point the <script> tag at it for production if you like
assets/img/ Bundled WebP images, including smaller van-800 and van-1200 copies of the hero van for phones
assets/fonts/ Self-hosted WOFF2 fonts and their licences
assets/img-manifest.json Sources and bake settings for the framed photographs
assets/img-src/ Masters and build-cutouts.mjs, which made the transparent cut-outs

This week: the schedule

Each <li class="ticket-day"> is one day:

Code snippet omitted: it ships with the download.

  • data-day is the weekday, 0 Sunday to 6 Saturday. Keep the tickets in Monday-to-Sunday order.
  • data-open / data-close are 24-hour times. The visible hours text is yours to write.
  • data-lnglat is longitude then latitude. Find it by right-clicking a spot on openstreetmap.org and choosing "Show address". Put the pin on the street itself, not a building roof.
  • The time zone is set by TIME_ZONE at the top of script.js (Europe/London here), so a visitor abroad still sees your local opening state.
  • Preview any moment with ?now=2026-10-22T18:30 in the URL.

Picking a ticket fills the pitch card, the Directions link (to OpenStreetMap directions) and the map. Today is picked on load. Days already gone this week show dashed and say "been". To drop the little van on the strip, delete the strip__road and strip__van SVGs.

Without JavaScript the strip is a plain grid of seven tickets with every address and note, and the map area is a link to OpenStreetMap.

The map

MapLibre GL with OpenFreeMap tiles (OpenStreetMap data; no key or account, commercial use allowed). The library and its stylesheet are loaded only when the section approaches, from the URLs on the data-map element; data-map-style sets the style (positron here; liberty and bright also work). The style is tinted towards the page colours on load; change the three colours in buildMap or remove that block to keep the original style. Wheel and one-finger touch keep scrolling the page, and the OpenStreetMap attribution must stay (it starts folded to its info button).

Menu: the hatch board

Each <li class="dish"> has data-diet (space-separated tags: v, vg, gf, hot) and data-dish, which names its cut-out in the wrapper stage (<figure data-plate="...">). Add a dish by adding both. The filter chips use the same tags; add a chip with a new data-diet-filter and tag your dishes with it. Sides take data-diet too. Hovering a row with a mouse previews its dish; clicking or Enter picks it.

Catering

The quote panel reads its bands from data-rates on .quote__out: a list of {"max": guests, "rate": pounds per head}, the first band whose max fits wins, and data-minimum is the minimum spend. PER_TRAY (guests per tray) and MAX_SHOWN (trays drawn before a "+N" label) are at the top of initCatering. The slider and the form's Guests field stay in step.

The enquiry and newsletter forms are front-end only. They validate and show a thank-you line. To send them, set each form's action to Formspree, Netlify Forms or your own endpoint and remove the e.preventDefault() in initForms.

Seen at

Stickers are <button data-sticker> whose centre is placed with --x, --y (percentages of the wall) and --r (tilt); --mx and --my set their places on phones. On desktop the three colour cells each hold a sticker; on phones those cells are hidden and the stickers sit over the photographs. They drag within the wall and move with the arrow keys (Shift for bigger steps). Grid cells are plain divs or framed photos; change the grid areas in .seen__wall to rearrange.

Palette

Four core tokens in :root: --butter (ground), --paper (tickets and cards), --cobalt (ink and the hatch board), --pink (the awning, the catering block, the picked ticket). --pink-deep, --cobalt-deep, --ink-on-pink, --sky and --blush are deeper or paler versions of them. The measured contrast pairs are in the :root comment; pink is a fill, never small text on butter or cobalt. The awnings recolour per section through --awn-a, --awn-b and --awn-rail.

Photography

All images are bundled WebP derivatives baked for this template; no hot-linked images.

  • Cut-outs (van.webp, dish-*.webp) were made by assets/img-src/build-cutouts.mjs from the masters in assets/img-src/: each dish is keyed against its plain ground, the van's paint is keyed by colour, and only the painted body is recoloured from red to pink, with a fictional number plate. Run it from the repo root with bun effects/food-truck-template/assets/img-src/build-cutouts.mjs. To use your own, any background-removal tool works: save a transparent WebP or PNG under the same name and keep the width/height attributes in step.
  • Framed photographs are listed in assets/img-manifest.json with their source and crop; regenerate with bun scripts/build-template-assets.ts food-truck-template.
  • The van decal is the SVG mark, positioned on the door with --decal-x and --decal-y in .van-decal.

Image credits (Pexels licence)

File Source
van.webp https://www.pexels.com/photo/6183463/ (red Citroën H food van, recoloured and cut out)
dish-birria.webp https://www.pexels.com/photo/35225168/
dish-jackfruit.webp https://www.pexels.com/photo/9258703/
dish-tinplate.webp https://www.pexels.com/photo/5848703/
dish-quesadilla.webp https://www.pexels.com/photo/16077374/
dish-totopos.webp https://www.pexels.com/photo/5848729/
seen-counter.webp https://www.pexels.com/photo/5779613/
seen-night.webp https://www.pexels.com/photo/8448071/
seen-party.webp https://www.pexels.com/photo/8920148/
seen-hatch.webp https://www.pexels.com/photo/5779663/
seen-crowd.webp https://www.pexels.com/photo/35120751/
catering-garden.webp https://www.pexels.com/photo/8920045/

Pexels photos are free to use and modify under the Pexels licence; they may not be sold unaltered. Replace them with your own photography before launch.

Fonts

All three faces are self-hosted latin WOFF2 files in assets/fonts/, declared with @font-face at the top of style.css (font-display: swap). Lilita One and Gantari, the two faces above the fold, are preloaded in <head>.

Font File Licence
Lilita One by Juan Montoreano lilita-one-latin.woff2 SIL Open Font License 1.1, OFL-LilitaOne.txt
Gantari by Lafontype gantari-latin.woff2 (variable, one file for 400, 600 and 800) SIL Open Font License 1.1, OFL-Gantari.txt
Yellowtail by Astigmatic yellowtail-latin.woff2 Apache License 2.0, LICENSE-Yellowtail.txt

To swap a face, replace its file and @font-face rule, update the --font-* token and the preload links, and keep its licence file beside it.

Accessibility

  • The week is a radiogroup: arrow keys, Home and End move the pick and focus together.
  • Dishes and dietary chips are buttons with aria-pressed; the picked dish's ticket and the pitch card are live regions.
  • Stickers are buttons that move with the arrow keys.
  • Visible focus rings throughout; in-page links move focus to their section.
  • The awning, mark, map pins and small van are decorative and hidden from assistive technology; the same information is in the text.
  • Reduced motion skips the intro, tearing, map flights, tray drops and the marquee but keeps every control working. Lenis is not started.
  • With the GSAP CDN blocked or JavaScript off, every section is readable as plain content.

Dependencies

  • GSAP 3.15.0 core, ScrollTrigger, Draggable and MotionPathPlugin (jsDelivr). Works with GSAP 3.12+.
  • Lenis 1.3.17 (unpkg), optional. Remove its <script> tag, or add data-smooth="off" to <html>, or ?smooth=off to the URL.
  • MapLibre GL 4.7.1 (unpkg), loaded on demand, and OpenFreeMap tiles.
  • Fonts: Lilita One, Yellowtail and Gantari, self-hosted in assets/fonts/.

Teardown

Everything the script creates lives in one GSAP context exposed as window.gsapContext. window.gsapContext.revert() kills every tween and ScrollTrigger, removes listeners and the tray stack, destroys the Draggables, removes the map and stops Lenis, leaving other animations on the page alone.

Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.