Cards & content / Cards

Embossed Relief Tile

Single square tile with square corners, light grey sheen background, centered clay-white raised object using inset highlight and soft shadow, and a tiny numeric label in the corner.

Rebuilt from teenage.engineering in the Embossed Lab Monochrome style.

npx shadcn@latest add https://justyoink.it/r/embossed-lab-monochrome/blocks/embossed-object-tile.json

Looks exactly like teenage.engineering: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Props: number (corner label), label (aria label prefix), shape (sphere | triangle | nut | umbrella), onSelect callback. Tile scales slightly and dims on hover; click toggles aria-pressed.

components/embossed-object-tile.tsx
import { useState } from "react";

type Props = {
  number?: number;
  label?: string;
  shape?: "sphere" | "triangle" | "nut" | "umbrella";
  onSelect?: () => void;
};

export default function EmbossedReliefTile({ number = 4, label = "Open door", shape = "sphere", onSelect }: Props) {
  const [pressed, setPressed] = useState(false);

  const relief = "shadow-[inset_-6px_-10px_22px_rgba(0,0,0,0.14),inset_6px_6px_14px_rgba(255,255,255,0.95),0_14px_24px_-10px_rgba(0,0,0,0.35)]";

  return (
    <div className="bg-canvas p-6 font-sans">
      <button
        type="button"
        aria-label={`${label} ${number}`}
        aria-pressed={pressed}
        onClick={() => { setPressed((p) => !p); onSelect?.(); }}
        className="group relative block aspect-square w-full max-w-[320px] overflow-hidden rounded-none border border-hairline bg-clay-sheen bg-tile text-ink shadow-emboss-relief transition-[transform,opacity] duration-tile-hover ease-tile-hover hover:scale-[0.985] hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-on-dark"
      >
        <span className="absolute right-4 top-3 text-caption text-ink">{number}</span>
        <span className="absolute inset-0 flex items-center justify-center">
          {shape === "sphere" && (
            <span className={`block h-[78%] w-[78%] rounded-full bg-[radial-gradient(circle_at_35%_30%,#ffffff,var(--color-tile)_55%,var(--color-tile-shade))] ${relief}`} />
          )}
          {shape === "triangle" && (
            <svg viewBox="0 0 100 100" className="h-[78%] w-[78%] drop-shadow-[0_6px_6px_rgba(0,0,0,0.25)]" aria-hidden="true">
              <polygon points="50,8 94,90 6,90" fill="none" stroke="#fafafa" strokeWidth="5" strokeLinejoin="round" />
              <polygon points="50,8 94,90 6,90" fill="none" stroke="rgba(0,0,0,0.12)" strokeWidth="1" transform="translate(1 1.5)" />
            </svg>
          )}
          {shape === "nut" && (
            <span className={`flex h-[78%] w-[78%] items-center justify-center bg-tile [clip-path:polygon(25%_4%,75%_4%,98%_50%,75%_96%,25%_96%,2%_50%)] ${relief}`}>
              <span className="block h-[42%] w-[42%] rounded-full bg-tile-shade shadow-[inset_4px_6px_10px_rgba(0,0,0,0.25),inset_-3px_-3px_6px_rgba(255,255,255,0.9)]" />
            </span>
          )}
          {shape === "umbrella" && (
            <svg viewBox="0 0 100 100" className="h-[78%] w-[78%] drop-shadow-[0_6px_6px_rgba(0,0,0,0.22)]" aria-hidden="true">
              <path d="M12 52 A38 38 0 0 1 88 52 Z" fill="#fafafa" />
              <path d="M50 14 V52 M31 22 L30 52 M69 22 L70 52" stroke="rgba(0,0,0,0.1)" strokeWidth="1.5" />
              <path d="M50 52 V84 A9 9 0 0 1 32 84" fill="none" stroke="#fafafa" strokeWidth="6" strokeLinecap="round" />
            </svg>
          )}
        </span>
      </button>
    </div>
  );
}

Quality checks

Automated, in a real browser · today
—

More from Embossed Lab Monochrome

The whole style →

Pictogram Mega Nav Bar

Headers & nav bars

Centered Link Footer

Footers

Embossed Advent Tile Grid

Feature sections

Centered Uppercase Intro Panel

Heroes

Quiet Countdown Readout

Stats & metrics

Hairline Newsletter Signup

Forms