Free
Demo
Tuppence Demo
A demo block extracted from the Tuppence template, available in Tailwind CSS.
0
1
A demo block extracted from the Tuppence template, available in Tailwind CSS.
Free download · up to 5 blocks per day. Unlimited with All-Access
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.FontAwesomeConfig = { autoReplaceSvg: 'nest' };
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tuppence Demo | Tailwind CSS UI Block</title>
<meta name="description" content="A demo block extracted from the Tuppence template, available in Tailwind CSS.">
<meta name="keywords" content="Tuppence, Tailwind CSS template, HTML website template, toy shop template, gift shop website, wooden toys store, ecommerce template, product page, shopping basket, small shop template">
<meta name="author" content="Let's templates">
<link rel="canonical" href="">
<meta property="og:type" content="product">
<meta property="og:site_name" content="Let's templates">
<meta property="og:locale" content="en_US">
<meta property="og:url" content="">
<meta property="og:title" content="Tuppence | Tailwind CSS Ecommerce Template">
<meta property="og:description" content="A soft Tailwind CSS template for toy shops, gift shops and small makers, with a one-word hero slider over a pastel wave, an age picker, a shop with filters, a product page and a working basket.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Tuppence template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Tuppence | Tailwind CSS Ecommerce Template">
<meta name="twitter:description" content="A soft Tailwind CSS template for toy shops, gift shops and small makers, with a one-word hero slider over a pastel wave, an age picker, a shop with filters, a product page and a working basket.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Tuppence template preview">
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Outfit:wght@400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
ink: { DEFAULT: '#1e1c1a', soft: '#6d6a66' },
poppy: { DEFAULT: '#e9522f', deep: '#c93f1f' },
butter: '#ffe9b8',
mint: '#d5efe2',
sky: '#d6e8fb',
blush: '#ffdcd6',
paper: '#faf8f5',
line: '#e8e5e0'
},
fontFamily: {
sans: ['Outfit', 'sans-serif'],
mono: ['"Courier Prime"', 'monospace']
}
}
}
}
</script>
<style>
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
.lines { background-image: linear-gradient(to right, rgba(30, 28, 26, .07) 1px, transparent 1px); background-size: 25% 100%; background-position: 12.5% 0; }
.wave { fill: var(--wave, #ffe9b8); transition: fill .5s ease; }
.wave-bg { background-color: var(--wave, #ffe9b8); transition: background-color .5s ease; }
.blob { border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; }
.disc { display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; }
.upright { writing-mode: vertical-rl; transform: rotate(180deg); }
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .wave, .wave-bg { transition: none; } }
</style>
</head>
<body class="bg-white font-sans text-ink antialiased">
<!-- block:start demo -->
<section class="relative overflow-hidden bg-paper px-5 py-20 md:px-10 md:py-28" data-ages>
<div class="mx-auto grid max-w-[1400px] gap-12 lg:grid-cols-[.9fr_1.1fr] lg:gap-20">
<div>
<p class="font-mono text-sm uppercase tracking-widest text-poppy">Buying a present?</p>
<h2 class="mt-3 text-5xl font-medium tracking-tight md:text-7xl">How old are they?</h2>
<p class="mt-10 flex items-end gap-4">
<span class="text-[7rem] font-medium leading-[.8] md:text-[10rem]" data-age-number>2</span>
<span class="pb-2 font-mono text-xl text-ink-soft" data-age-unit>years old</span>
</p>
<label class="mt-10 block max-w-md">
<span class="sr-only">Age of the child in years</span>
<input type="range" min="0" max="8" step="1" value="2" data-age-range class="w-full accent-poppy">
<span class="mt-2 flex justify-between font-mono text-sm text-ink-soft"><span>newborn</span><span>8 years</span></span>
</label>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="0" hidden>Everything goes in the mouth. Big, smooth and impossible to swallow.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="1" hidden>They have just learned to walk and want company while they do it.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="2" >Stacking, loading, tipping out and starting again.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="3" hidden>Stories begin: the boat is going somewhere and the driver has a name.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="4" hidden>Small worlds. Give them a town and they will run it.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="5" hidden>They want things that work properly, with doors and wheels.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="6" hidden>Puzzles, patience and showing the grown-ups how it is done.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="7" hidden>Old enough to look after a toy and young enough to still play with it.</p>
<p class="mt-8 max-w-md font-mono text-lg leading-relaxed" data-age-note="8" hidden>The last toys are the ones they keep on a shelf for ever.</p>
</div>
<div>
<p class="font-mono text-ink-soft" aria-live="polite">We would wrap up one of these <span data-age-count>3</span>:</p>
<ul class="mt-5 border-t border-line">
<li data-age-toy data-min="1" data-max="3" class="flex items-center gap-5 border-b border-line py-4" hidden>
<img src="https://images.unsplash.com/photo-1560360301-07bb70e7c26c?auto=format&fit=crop&w=300&q=80" alt="A striped wooden zebra pull-along toy on red wheels" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="pull-along-zebra.html" class="text-2xl font-medium hover:text-poppy">Pull-along zebra</a>
<p class="font-mono text-ink-soft">Follows them round the kitchen</p>
</div>
<span class="text-2xl">£24</span>
<button type="button" data-add="pull-along-zebra" aria-pressed="false" aria-label="Add Pull-along zebra to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="0" data-max="2" class="flex items-center gap-5 border-b border-line py-4" >
<img src="https://images.unsplash.com/photo-1618842676088-c4d48a6a7c9d?auto=format&fit=crop&w=300&q=80" alt="Colourful wooden stacking rings beside their post" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#stacking-rings" class="text-2xl font-medium hover:text-poppy">Stacking rings</a>
<p class="font-mono text-ink-soft">On, off and on again</p>
</div>
<span class="text-2xl">£18</span>
<button type="button" data-add="stacking-rings" aria-pressed="false" aria-label="Add Stacking rings to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="2" data-max="5" class="flex items-center gap-5 border-b border-line py-4" >
<img src="https://images.unsplash.com/photo-1600987608520-29713f8cc23e?auto=format&fit=crop&w=300&q=80" alt="A painted wooden toy train with blue wheels" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#little-goods-train" class="text-2xl font-medium hover:text-poppy">Little goods train</a>
<p class="font-mono text-ink-soft">An engine and two wagons to load</p>
</div>
<span class="text-2xl">£32</span>
<button type="button" data-add="little-goods-train" aria-pressed="false" aria-label="Add Little goods train to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="3" data-max="6" class="flex items-center gap-5 border-b border-line py-4" hidden>
<img src="https://images.unsplash.com/photo-1560859251-d563a49c5e4a?auto=format&fit=crop&w=300&q=80" alt="Three small wooden boats with paper sails in a row" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#three-sail-boats" class="text-2xl font-medium hover:text-poppy">Three sail boats</a>
<p class="font-mono text-ink-soft">For baths, puddles and ponds</p>
</div>
<span class="text-2xl">£21</span>
<button type="button" data-add="three-sail-boats" aria-pressed="false" aria-label="Add Three sail boats to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="2" data-max="6" class="flex items-center gap-5 border-b border-line py-4" >
<img src="https://images.unsplash.com/photo-1558907353-ceb54f3882ed?auto=format&fit=crop&w=300&q=80" alt="A pile of wooden alphabet blocks with coloured letters" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#alphabet-blocks" class="text-2xl font-medium hover:text-poppy">Alphabet blocks</a>
<p class="font-mono text-ink-soft">Towers now, spelling later</p>
</div>
<span class="text-2xl">£28</span>
<button type="button" data-add="alphabet-blocks" aria-pressed="false" aria-label="Add Alphabet blocks to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="3" data-max="7" class="flex items-center gap-5 border-b border-line py-4" hidden>
<img src="https://images.unsplash.com/photo-1622172498642-0720d6a2500f?auto=format&fit=crop&w=300&q=80" alt="Four wooden racing cars with animal drivers on a toy track" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#racing-four" class="text-2xl font-medium hover:text-poppy">The racing four</a>
<p class="font-mono text-ink-soft">Four cars, four drivers, one winner</p>
</div>
<span class="text-2xl">£26</span>
<button type="button" data-add="racing-four" aria-pressed="false" aria-label="Add The racing four to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="3" data-max="8" class="flex items-center gap-5 border-b border-line py-4" hidden>
<img src="https://images.unsplash.com/photo-1777351396220-9a3801de44df?auto=format&fit=crop&w=300&q=80" alt="A bowl full of small painted wooden houses and cars" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#town-in-a-bowl" class="text-2xl font-medium hover:text-poppy">Town in a bowl</a>
<p class="font-mono text-ink-soft">Thirty houses, shops and cars</p>
</div>
<span class="text-2xl">£34</span>
<button type="button" data-add="town-in-a-bowl" aria-pressed="false" aria-label="Add Town in a bowl to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="6" data-max="8" class="flex items-center gap-5 border-b border-line py-4" hidden>
<img src="https://images.unsplash.com/photo-1589495374906-b7f5ca5de879?auto=format&fit=crop&w=300&q=80" alt="An interlocking wooden puzzle cube on a table" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#puzzle-cube" class="text-2xl font-medium hover:text-poppy">Puzzle cube</a>
<p class="font-mono text-ink-soft">Comes apart faster than it goes back</p>
</div>
<span class="text-2xl">£16</span>
<button type="button" data-add="puzzle-cube" aria-pressed="false" aria-label="Add Puzzle cube to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
<li data-age-toy data-min="5" data-max="8" class="flex items-center gap-5 border-b border-line py-4" hidden>
<img src="https://images.unsplash.com/photo-1625651417672-c9aa0a62f269?auto=format&fit=crop&w=300&q=80" alt="A detailed wooden vintage touring car with black wheels" class="blob h-20 w-20 shrink-0 object-cover">
<div class="min-w-0 flex-1">
<a href="shop.html#touring-car" class="text-2xl font-medium hover:text-poppy">The touring car</a>
<p class="font-mono text-ink-soft">Doors that open, wheels that steer</p>
</div>
<span class="text-2xl">£38</span>
<button type="button" data-add="touring-car" aria-pressed="false" aria-label="Add The touring car to the basket" class="disc h-11 w-11 shrink-0 bg-ink text-white transition hover:bg-poppy aria-pressed:bg-poppy"><i class="fa-solid fa-plus"></i></button>
</li>
</ul>
<p class="mt-6 font-mono text-ink-soft">Every toy comes wrapped in brown paper and string. <a href="shop.html" class="text-ink underline underline-offset-4">See all nine</a></p>
</div>
</div>
</section>
<!-- block:end demo -->
<script>
document.querySelectorAll("[data-menu-toggle]").forEach((toggle) => {
const menu = document.getElementById(toggle.getAttribute("aria-controls"));
if (!menu) return;
toggle.addEventListener("click", () => {
const open = toggle.getAttribute("aria-expanded") !== "true";
toggle.setAttribute("aria-expanded", String(open));
menu.hidden = !open;
});
});
const basket = {
key: "tuppence-basket",
sample: { "pull-along-zebra": 1, "stacking-rings": 1 },
read() {
try {
const saved = localStorage.getItem(this.key);
return saved ? JSON.parse(saved) : { ...this.sample };
} catch (error) {
return { ...this.sample };
}
},
write(items) {
try { localStorage.setItem(this.key, JSON.stringify(items)); } catch (error) { /* private mode: the page still works */ }
this.count(items);
},
count(items = this.read()) {
const total = Object.values(items).reduce((sum, quantity) => sum + quantity, 0);
document.querySelectorAll("[data-basket-count]").forEach((badge) => { badge.textContent = total; });
}
};
basket.count();
document.querySelectorAll("[data-add]").forEach((button) => {
button.addEventListener("click", () => {
const items = basket.read();
const quantity = Number(document.querySelector("[data-quantity]")?.value || 1);
items[button.dataset.add] = (items[button.dataset.add] || 0) + quantity;
basket.write(items);
button.setAttribute("aria-pressed", "true");
const label = button.querySelector("[data-add-label]");
if (label) label.textContent = "In the basket";
});
});
document.querySelectorAll("[data-slider]").forEach((slider) => {
const slides = [...slider.querySelectorAll("[data-slide]")];
const dots = [...slider.querySelectorAll("[data-slider-dot]")];
let current = 0;
const show = (index) => {
current = (index + slides.length) % slides.length;
slides.forEach((slide, position) => { slide.hidden = position !== current; });
dots.forEach((dot, position) => dot.setAttribute("aria-pressed", String(position === current)));
slider.style.setProperty("--wave", slides[current].dataset.wave);
slider.querySelectorAll("[data-slider-current]").forEach((node) => { node.textContent = current + 1; });
slider.querySelectorAll("[data-slider-bar]").forEach((bar) => { bar.style.height = `${(current + 1) / slides.length * 100}%`; });
};
dots.forEach((dot, index) => dot.addEventListener("click", () => show(index)));
slider.querySelectorAll("[data-slider-next]").forEach((next) => next.addEventListener("click", () => show(current + 1)));
});
document.querySelectorAll("[data-ages]").forEach((scope) => {
const range = scope.querySelector("[data-age-range]");
const update = () => {
const age = Number(range.value);
scope.querySelector("[data-age-number]").textContent = age === 0 ? "0" : age;
scope.querySelector("[data-age-unit]").textContent = age === 0 ? "not one yet" : age === 1 ? "year old" : "years old";
scope.querySelectorAll("[data-age-note]").forEach((note) => { note.hidden = Number(note.dataset.ageNote) !== age; });
let shown = 0;
scope.querySelectorAll("[data-age-toy]").forEach((toy) => {
const fits = age >= Number(toy.dataset.min) && age <= Number(toy.dataset.max) && shown < 3;
toy.hidden = !fits;
if (fits) shown += 1;
});
scope.querySelector("[data-age-count]").textContent = shown;
};
range.addEventListener("input", update);
update();
});
document.querySelectorAll("[data-quotes]").forEach((scope) => {
const quotes = scope.querySelectorAll("[data-quote]");
const picks = scope.querySelectorAll("[data-quote-pick]");
picks.forEach((pick, index) => pick.addEventListener("click", () => {
picks.forEach((other) => other.setAttribute("aria-pressed", String(other === pick)));
quotes.forEach((quote, position) => { quote.hidden = position !== index; });
}));
});
document.querySelectorAll("[data-enquiry]").forEach((form) => {
form.addEventListener("submit", (event) => {
event.preventDefault();
if (!form.reportValidity()) return;
form.querySelector("[data-enquiry-done]").hidden = false;
});
});
(() => {
const items = document.querySelectorAll("[data-reveal]");
const skip = navigator.webdriver || !("IntersectionObserver" in window) || matchMedia("(prefers-reduced-motion: reduce)").matches;
if (!items.length || skip) return;
document.documentElement.classList.add("reveal-ready");
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add("is-visible");
observer.unobserve(entry.target);
});
}, { rootMargin: "0px 0px -10% 0px" });
items.forEach((item) => observer.observe(item));
})();
</script>
<!-- Optional credit — delete this block if you prefer a clean footer -->
<p class="lt-built-with" style="margin:0;padding:12px 16px;text-align:center;font:500 11px/1.4 system-ui,-apple-system,sans-serif;color:#9ca3af;">Built with <a href="https://letstemplates.com" style="color:#059669;text-decoration:none;">Let's templates</a></p>
</body>
</html>
Premium
E-commerce
Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.