Page sections / Feature sections
Embossed Advent Tile Grid
Four-column square grid of pale clay tiles separated by 1px grey hairlines, each holding a soft 3D embossed object (triangle, sphere, umbrella, screw, hand, keys) with a small day number in the top-right corner. The final tile spans two columns and two rows with a large embossed logo.
Rebuilt from teenage.engineering in the Embossed Lab Monochrome style.
Looks exactly like teenage.engineering: brings its fonts and colours, namespaced so your own theme stays untouched.
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: intro (array of heading lines), countdownLabel and countdown (footer text). Click a tile to toggle it open; tiles lift and fade on hover.
components/embossed-tile-grid.tsx
import { useState } from "react"; type Props = { intro?: string[]; countdownLabel?: string; countdown?: string; }; const shapes = ["ring", "ball", "tri", "bars", "arch", "cross"] as const; function Emboss({ kind }: { kind: string }) { const base = "bg-tile shadow-emboss-relief"; if (kind === "ball") return <div className={`h-3/4 w-3/4 rounded-full ${base} bg-[radial-gradient(circle_at_35%_30%,#fff,#d9d9d9)]`} />; if (kind === "ring") return <div className={`flex h-3/4 w-3/4 items-center justify-center rounded-full ${base}`}><div className="h-1/2 w-1/2 rounded-full bg-tile-shade shadow-inner" /></div>; if (kind === "tri") return ( <svg viewBox="0 0 100 100" className="h-3/4 w-3/4 drop-shadow-[2px_3px_3px_rgba(0,0,0,0.25)]"> <path d="M50 10 L92 88 L8 88 Z" fill="none" stroke="#fff" strokeWidth="5" strokeLinejoin="round" /> </svg> ); if (kind === "bars") return ( <div className="flex h-1/2 w-3/4 items-stretch gap-1"> {Array.from({ length: 9 }).map((_, i) => ( <div key={i} className={`flex-1 rounded-soft ${base}`} /> ))} </div> ); if (kind === "arch") return <div className={`h-1/2 w-3/4 rounded-t-full ${base}`} />; return ( <div className="relative h-3/4 w-3/4"> <div className={`absolute left-[35%] top-0 h-full w-[30%] rounded-soft ${base}`} /> <div className={`absolute left-0 top-[35%] h-[30%] w-full rounded-soft ${base}`} /> </div> ); } export default function EmbossedAdventTileGrid({ intro = ["A little countdown of small surprises,", "one tile unlocks every morning,", "running through the whole festive month."], countdownLabel = "Next tile unlocks in:", countdown = "06:12:48", }: Props) { const [opened, setOpened] = useState<number[]>([]); const toggle = (n: number) => setOpened((o) => (o.includes(n) ? o.filter((x) => x !== n) : [...o, n])); return ( <section className="bg-canvas px-1 py-10 text-on-dark animate-fade-in"> <div className="bg-tile px-4 py-10 text-center text-body text-ink uppercase"> {intro.map((l) => ( <p key={l}>{l}</p> ))} </div> <div className="grid grid-cols-2 gap-px bg-hairline md:grid-cols-4"> {Array.from({ length: 24 }).map((_, i) => { const n = i + 1; const isOpen = opened.includes(n); return ( <button key={n} onClick={() => toggle(n)} aria-pressed={isOpen} aria-label={`Tile ${n}`} className="relative flex aspect-square items-center justify-center bg-tile bg-clay-sheen text-ink transition duration-tile-hover ease-tile-hover hover:-translate-y-0.5 hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink" > <span className="absolute right-3 top-2 text-caption text-muted">{n}</span> <div className={`flex h-full w-full items-center justify-center transition ${isOpen ? "scale-90 opacity-40" : ""}`}> <Emboss kind={shapes[i % shapes.length]} /> </div> </button> ); })} <button onClick={() => toggle(25)} aria-label="Tile 25" className="relative col-span-2 row-span-2 flex aspect-square items-center justify-center bg-tile bg-clay-sheen text-ink transition duration-tile-hover ease-tile-hover hover:-translate-y-0.5 hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink" > <span className="absolute right-3 top-2 text-caption text-muted">25</span> <div className="flex h-3/4 w-3/4 items-center justify-center rounded-[20%] bg-tile shadow-emboss-lift"> <div className="h-1/2 w-1/2 rounded-full bg-tile-shade shadow-emboss-relief" /> </div> </button> </div> <p className="mt-16 text-center text-body uppercase"> {countdownLabel}<br />{countdown} </p> </section> ); }import { useState } from "react"; type Props = { intro?: string[]; countdownLabel?: string; countdown?: string; }; const shapes = ["ring", "ball", "tri", "bars", "arch", "cross"] as const; function Emboss({ kind }: { kind: string }) { const base = "bg-foreground shadow-embossed-emboss-relief"; if (kind === "ball") return <div className={`h-3/4 w-3/4 rounded-full ${base} bg-[radial-gradient(circle_at_35%_30%,#fff,#d9d9d9)]`} />; if (kind === "ring") return <div className={`flex h-3/4 w-3/4 items-center justify-center rounded-full ${base}`}><div className="h-1/2 w-1/2 rounded-full bg-foreground shadow-inner" /></div>; if (kind === "tri") return ( <svg viewBox="0 0 100 100" className="h-3/4 w-3/4 drop-shadow-[2px_3px_3px_rgba(0,0,0,0.25)]"> <path d="M50 10 L92 88 L8 88 Z" fill="none" stroke="var(--color-foreground)" strokeWidth="5" strokeLinejoin="round" /> </svg> ); if (kind === "bars") return ( <div className="flex h-1/2 w-3/4 items-stretch gap-1"> {Array.from({ length: 9 }).map((_, i) => ( <div key={i} className={`flex-1 rounded-lg ${base}`} /> ))} </div> ); if (kind === "arch") return <div className={`h-1/2 w-3/4 rounded-t-full ${base}`} />; return ( <div className="relative h-3/4 w-3/4"> <div className={`absolute left-[35%] top-0 h-full w-[30%] rounded-lg ${base}`} /> <div className={`absolute left-0 top-[35%] h-[30%] w-full rounded-lg ${base}`} /> </div> ); } export default function EmbossedAdventTileGrid({ intro = ["A little countdown of small surprises,", "one tile unlocks every morning,", "running through the whole festive month."], countdownLabel = "Next tile unlocks in:", countdown = "06:12:48", }: Props) { const [opened, setOpened] = useState<number[]>([]); const toggle = (n: number) => setOpened((o) => (o.includes(n) ? o.filter((x) => x !== n) : [...o, n])); return ( <section className="bg-background px-1 py-10 text-foreground animate-embossed-fade-in"> <div className="bg-foreground px-4 py-10 text-center text-embossed-body text-background uppercase"> {intro.map((l) => ( <p key={l}>{l}</p> ))} </div> <div className="grid grid-cols-2 gap-px bg-border md:grid-cols-4"> {Array.from({ length: 24 }).map((_, i) => { const n = i + 1; const isOpen = opened.includes(n); return ( <button key={n} onClick={() => toggle(n)} aria-pressed={isOpen} aria-label={`Tile ${n}`} className="relative flex aspect-square items-center justify-center bg-foreground text-background transition duration-embossed-tile-hover ease-embossed-tile-hover hover:-translate-y-0.5 hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground" > <span className="absolute right-3 top-2 text-embossed-caption text-muted-foreground">{n}</span> <div className={`flex h-full w-full items-center justify-center transition ${isOpen ? "scale-90 opacity-40" : ""}`}> <Emboss kind={shapes[i % shapes.length]} /> </div> </button> ); })} <button onClick={() => toggle(25)} aria-label="Tile 25" className="relative col-span-2 row-span-2 flex aspect-square items-center justify-center bg-foreground text-background transition duration-embossed-tile-hover ease-embossed-tile-hover hover:-translate-y-0.5 hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground" > <span className="absolute right-3 top-2 text-embossed-caption text-muted-foreground">25</span> <div className="flex h-3/4 w-3/4 items-center justify-center rounded-[20%] bg-foreground shadow-embossed-emboss-lift"> <div className="h-1/2 w-1/2 rounded-full bg-foreground shadow-embossed-emboss-relief" /> </div> </button> </div> <p className="mt-16 text-center text-embossed-body uppercase"> {countdownLabel}<br />{countdown} </p> </section> ); }
Quality checks
Automated, in a real browser · today- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: not passedElements must meet minimum color contrast ratio thresholds (16 elements)
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.