Page sections / Comparison tables
Dotted Grid Comparison Matrix
Dense seven-column table with tiny mono column headers, dotted horizontal and vertical rules, underlined product links with lavender underline, and the primary product's row highlighted in pale lavender.
Rebuilt from hermes-agent.nousresearch.com/compare in the Electric Ultramarine Engraving style.
Looks exactly like hermes-agent.nousresearch.com: 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: title, intro, columns (7 header labels), and rows ({product, cells[6], featured?, link?}). The featured row gets the pale lavender fill; other rows tint on hover and product links have lavender underlines that deepen on hover.
components/competitor-matrix-table.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Row = { product: string; cells: string[]; featured?: boolean; link?: boolean }; const defaultColumns = ["Product", "Self-hosted", "Runs on", "Engines", "Channels", "Retains context", "To start"]; const defaultRows: Row[] = [ { product: "Northwind Pilot", featured: true, cells: ["Yes (Apache)", "Your server or Northwind Cloud", "Dozens of engines, plus local", "More than 15 channels", "Keeps notes, drafts own routines", "Free, plus usage costs"] }, { product: "Altura Desk", link: true, cells: ["Yes (MIT)", "Your laptop, server or VPS", "Many vendors, local engines", "Chat, Mail and 10+ more", "Yes, saved routines", "Free, plus usage costs"] }, { product: "Lumen Relay", link: true, cells: ["No source published", "Lumen's hosted cloud", "One house engine", "Web and mobile only", "Private notes, not exportable", "Pro or Team plan"] }, { product: "Kitefield", link: true, cells: ["No", "Kitefield's cloud", "Kitefield house models", "Own apps and web", "Editable notes file", "Free with a daily cap"] }, { product: "Harbor Loop", link: true, cells: ["No, proprietary", "Harbor's own servers", "No choice offered", "SMS and chat apps", "Fixed behaviour", "Invite-only beta"] }, { product: "Quill Station", link: true, cells: ["CLI and SDK, MIT", "Local or hosted", "Three vendors, local", "Team chat, admin setup", "Opt-in local notes", "Free starter plan"] }, ]; export default function DottedGridComparisonMatrix({ title = "The roster", intro = "Six questions that settle most decisions, answered for every tool. Select a name for the details and sources.", columns = defaultColumns, rows = defaultRows, }: { title?: string; intro?: string; columns?: string[]; rows?: Row[]; }) { return ( <section className="bg-paper px-6 py-16 text-cobalt-deep md:px-[175px]"> <div className="mx-auto max-w-[1080px]"> <Reveal from="up"> <h2 className="font-display text-display text-cobalt-deep">{title}</h2> <p className="mt-4 max-w-[740px] font-sans text-body-lg">{intro}</p> </Reveal> <div className="mt-12 overflow-x-auto"> <table className="w-full min-w-[960px] border-collapse text-left font-sans text-body"> <thead> <tr> {columns.map((c) => ( <th key={c} scope="col" className="pb-3 pr-4 align-bottom font-mono text-micro font-normal text-cobalt-deep"> {c} </th> ))} </tr> </thead> <tbody> {rows.map((r) => ( <tr key={r.product} className={"border-t border-dotted border-cobalt-deep transition-colors hover:bg-paper-tint " + (r.featured ? "bg-paper-tint" : "") + " last:border-b"} > <th scope="row" className="py-[10px] pr-4 align-top font-normal"> {r.link ? ( <a href="#" className="underline decoration-periwinkle decoration-2 underline-offset-4 transition-colors duration-link-underline ease-link-underline hover:decoration-cobalt-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-cobalt" > {r.product} </a> ) : ( r.product )} </th> {r.cells.map((cell, i) => ( <td key={i} className="border-l border-dotted border-cobalt-deep py-[10px] pl-1 pr-4 align-top first:border-l-0"> {cell} </td> ))} </tr> ))} </tbody> </table> </div> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal ---- const YK_EASE = "cubic-bezier(0.16, 1, 0.3, 1)"; const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; function ykReducedMotion(): boolean { return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches; } // "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance. // Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed, // and there is a box to watch), and a safety net reveals anything on screen that is still hidden. type YkRevealState = "idle" | "hidden" | "shown"; function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState { const [state, setState] = useState<YkRevealState>("idle"); useYkLayoutEffect(() => { const el = ref.current; if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return; // watch the element's own box, or its children when it has none (display: contents) const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]); const onScreen = (t: Element) => { const r = t.getBoundingClientRect(); return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth; }; if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible let shown = false; const show = (v: boolean) => { if (v !== shown) (shown = v), setState(v ? "shown" : "hidden"); }; setState("hidden"); const inView = new Set<Element>(); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) inView.add(e.target); else inView.delete(e.target); } if (inView.size) { show(true); if (once) io.disconnect(); } else if (!once) show(false); }); const watched = new Set<Element>(); const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t))); watch(); // safety net: styles that land after mount (display: contents) get watched too, and nothing // stays hidden for more than a moment while it is actually on screen const start = Date.now(); const net = setInterval(() => { if (shown) return once && clearInterval(net); watch(); if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true); }, 600); return () => { io.disconnect(); clearInterval(net); }; }, [once]); return state; } type YkRevealFrom = "up" | "down" | "left" | "right" | "scale" | "blur" | "none"; /** Fades content in as it scrolls into view. */ function Reveal({ children, from = "up", delay = 0, duration = 700, distance = 24, once = true, as = "div", className, style, }: { children?: ReactNode; from?: YkRevealFrom; delay?: number; duration?: number; distance?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); const hidden = state === "hidden"; const offset = { up: `translate3d(0, ${distance}px, 0)`, down: `translate3d(0, ${-distance}px, 0)`, left: `translate3d(${-distance}px, 0, 0)`, right: `translate3d(${distance}px, 0, 0)`, scale: "scale(0.94)", blur: `translate3d(0, ${distance / 2}px, 0)`, none: "none", }[from]; const t = `${duration}ms ${YK_EASE} ${delay}ms`; return ( <Tag ref={ref} className={className} style={{ ...style, ...(hidden && { opacity: 0, transform: offset, filter: from === "blur" ? "blur(12px)" : undefined }), ...(state === "shown" && { transition: `opacity ${t}, transform ${t}, filter ${t}` }), }} > {children} </Tag> ); }"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Row = { product: string; cells: string[]; featured?: boolean; link?: boolean }; const defaultColumns = ["Product", "Self-hosted", "Runs on", "Engines", "Channels", "Retains context", "To start"]; const defaultRows: Row[] = [ { product: "Northwind Pilot", featured: true, cells: ["Yes (Apache)", "Your server or Northwind Cloud", "Dozens of engines, plus local", "More than 15 channels", "Keeps notes, drafts own routines", "Free, plus usage costs"] }, { product: "Altura Desk", link: true, cells: ["Yes (MIT)", "Your laptop, server or VPS", "Many vendors, local engines", "Chat, Mail and 10+ more", "Yes, saved routines", "Free, plus usage costs"] }, { product: "Lumen Relay", link: true, cells: ["No source published", "Lumen's hosted cloud", "One house engine", "Web and mobile only", "Private notes, not exportable", "Pro or Team plan"] }, { product: "Kitefield", link: true, cells: ["No", "Kitefield's cloud", "Kitefield house models", "Own apps and web", "Editable notes file", "Free with a daily cap"] }, { product: "Harbor Loop", link: true, cells: ["No, proprietary", "Harbor's own servers", "No choice offered", "SMS and chat apps", "Fixed behaviour", "Invite-only beta"] }, { product: "Quill Station", link: true, cells: ["CLI and SDK, MIT", "Local or hosted", "Three vendors, local", "Team chat, admin setup", "Opt-in local notes", "Free starter plan"] }, ]; export default function DottedGridComparisonMatrix({ title = "The roster", intro = "Six questions that settle most decisions, answered for every tool. Select a name for the details and sources.", columns = defaultColumns, rows = defaultRows, }: { title?: string; intro?: string; columns?: string[]; rows?: Row[]; }) { return ( <section className="bg-foreground px-6 py-16 text-primary/90 md:px-[175px]"> <div className="mx-auto max-w-[1080px]"> <Reveal from="up"> <h2 className="font-sans text-electric-display text-primary/90">{title}</h2> <p className="mt-4 max-w-[740px] font-sans text-electric-body-lg">{intro}</p> </Reveal> <div className="mt-12 overflow-x-auto"> <table className="w-full min-w-[960px] border-collapse text-left font-sans text-electric-body"> <thead> <tr> {columns.map((c) => ( <th key={c} scope="col" className="pb-3 pr-4 align-bottom font-mono text-electric-micro font-normal text-primary/90"> {c} </th> ))} </tr> </thead> <tbody> {rows.map((r) => ( <tr key={r.product} className={"border-t border-dotted border-primary/90 transition-colors hover:bg-foreground " + (r.featured ? "bg-foreground" : "") + " last:border-b"} > <th scope="row" className="py-[10px] pr-4 align-top font-normal"> {r.link ? ( <a href="#" className="underline decoration-muted-foreground decoration-2 underline-offset-4 transition-colors duration-electric-link-underline ease-electric-link-underline hover:decoration-primary/90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-background" > {r.product} </a> ) : ( r.product )} </th> {r.cells.map((cell, i) => ( <td key={i} className="border-l border-dotted border-primary/90 py-[10px] pl-1 pr-4 align-top first:border-l-0"> {cell} </td> ))} </tr> ))} </tbody> </table> </div> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal ---- const YK_EASE = "cubic-bezier(0.16, 1, 0.3, 1)"; const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; function ykReducedMotion(): boolean { return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches; } // "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance. // Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed, // and there is a box to watch), and a safety net reveals anything on screen that is still hidden. type YkRevealState = "idle" | "hidden" | "shown"; function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState { const [state, setState] = useState<YkRevealState>("idle"); useYkLayoutEffect(() => { const el = ref.current; if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return; // watch the element's own box, or its children when it has none (display: contents) const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]); const onScreen = (t: Element) => { const r = t.getBoundingClientRect(); return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth; }; if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible let shown = false; const show = (v: boolean) => { if (v !== shown) (shown = v), setState(v ? "shown" : "hidden"); }; setState("hidden"); const inView = new Set<Element>(); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) inView.add(e.target); else inView.delete(e.target); } if (inView.size) { show(true); if (once) io.disconnect(); } else if (!once) show(false); }); const watched = new Set<Element>(); const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t))); watch(); // safety net: styles that land after mount (display: contents) get watched too, and nothing // stays hidden for more than a moment while it is actually on screen const start = Date.now(); const net = setInterval(() => { if (shown) return once && clearInterval(net); watch(); if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true); }, 600); return () => { io.disconnect(); clearInterval(net); }; }, [once]); return state; } type YkRevealFrom = "up" | "down" | "left" | "right" | "scale" | "blur" | "none"; /** Fades content in as it scrolls into view. */ function Reveal({ children, from = "up", delay = 0, duration = 700, distance = 24, once = true, as = "div", className, style, }: { children?: ReactNode; from?: YkRevealFrom; delay?: number; duration?: number; distance?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); const hidden = state === "hidden"; const offset = { up: `translate3d(0, ${distance}px, 0)`, down: `translate3d(0, ${-distance}px, 0)`, left: `translate3d(${-distance}px, 0, 0)`, right: `translate3d(${distance}px, 0, 0)`, scale: "scale(0.94)", blur: `translate3d(0, ${distance / 2}px, 0)`, none: "none", }[from]; const t = `${duration}ms ${YK_EASE} ${delay}ms`; return ( <Tag ref={ref} className={className} style={{ ...style, ...(hidden && { opacity: 0, transform: offset, filter: from === "blur" ? "blur(12px)" : undefined }), ...(state === "shown" && { transition: `opacity ${t}, transform ${t}, filter ${t}` }), }} > {children} </Tag> ); }
Quality checks
Automated, in a real browser · 5d ago- 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 (51 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.