Dated Journal Ticker List
Compact list with an uppercase JOURNAL label and SEE ALL arrow link over a hairline, followed by rows with small tracked date and title text separated by thin rules.
Rebuilt from epic.net in the Gallery Graphite Editorial style.
npx shadcn@latest add https://justyoink.it/r/gallery-graphite-editorial/blocks/journal-list.json
Looks exactly like epic.net: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/gallery-graphite-editorial/mine/journal-list.json
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: label, seeAllLabel, seeAllHref, and entries (array of {date, title, href}). Renders standalone with defaults; rows shift and underline on hover and the arrow slides.
components/journal-list.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Entry = { date: string; title: string; href?: string }; type Props = { label?: string; seeAllLabel?: string; seeAllHref?: string; entries?: Entry[]; }; const defaultEntries: Entry[] = [ { date: "12 March 2026", title: "Designing Calm Interfaces for Busy Teams", href: "#" }, { date: "04 March 2026", title: "Notes on Type, Rhythm & Whitespace", href: "#" }, { date: "21 February 2026", title: "Why Prototypes Beat Slide Decks", href: "#" }, { date: "09 February 2026", title: "A Field Guide to Motion Systems", href: "#" }, ]; function Arrow() { return ( <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.2" aria-hidden="true" className="transition-transform duration-smooth-slide ease-smooth-slide group-hover:translate-x-1" > <path d="M2 7h10M8 3l4 4-4 4" /> </svg> ); } export default function DatedJournalTickerList({ label = "Journal", seeAllLabel = "See all", seeAllHref = "#", entries = defaultEntries, }: Props) { return ( <section aria-label={label} className="w-full max-w-sm bg-canvas font-sans text-ink"> <div className="flex items-center justify-between border-b border-ink pb-2"> <h2 className="text-label uppercase tracking-[0.2em] text-[10px]">{label}</h2> <a href={seeAllHref} className="group inline-flex items-center gap-2 text-[10px] font-medium uppercase tracking-[0.12em] focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-4 focus-visible:outline-ink" > {seeAllLabel} <Arrow /> </a> </div> <Stagger step={80} from="up" distance={12} as="ul" className="flex flex-col"> {entries.map((e, i) => ( <li key={i} className="border-b border-hairline last:border-b-0"> <a href={e.href ?? "#"} className="group block py-3 transition-transform duration-smooth-slide ease-smooth-slide hover:translate-x-1 focus-visible:outline focus-visible:outline-1 focus-visible:outline-ink" > <time className="block text-[9px] uppercase tracking-[0.18em] text-jet/70">{e.date}</time> <span className="mt-1 block text-[12px] leading-snug underline decoration-transparent underline-offset-4 transition-colors duration-hover-fill ease-hover-fill group-hover:decoration-ink"> {e.title} </span> </a> </li> ))} </Stagger> </section> ); } // ---- Yoink motion (inlined, no dependencies): Stagger ---- 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; } /** Reveals each direct child one after another when the group scrolls into view. */ function Stagger({ children, step = 90, from = "up", distance = 20, duration = 650, delay = 0, once = true, as = "div", className, style, }: { children?: ReactNode; step?: number; from?: "up" | "down" | "left" | "right" | "scale" | "fade"; distance?: number; duration?: number; delay?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); useYkLayoutEffect(() => { const items = Array.from(ref.current?.children ?? []) as HTMLElement[]; if (state === "idle") return; 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.92)", fade: "none", }[from]; if (state === "hidden") { for (const el of items) Object.assign(el.style, { transition: "none", opacity: "0", transform: offset }); return; } items.forEach((el, i) => { const t = `${duration}ms ${YK_EASE} ${delay + i * step}ms`; Object.assign(el.style, { transition: `opacity ${t}, transform ${t}`, opacity: "", transform: "" }); }); // hand the children their own transitions back once everything has landed const done = setTimeout(() => items.forEach((el) => (el.style.transition = "")), delay + items.length * step + duration + 50); return () => clearTimeout(done); }, [state]); return ( <Tag ref={ref} className={className} style={style}> {children} </Tag> ); }"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Entry = { date: string; title: string; href?: string }; type Props = { label?: string; seeAllLabel?: string; seeAllHref?: string; entries?: Entry[]; }; const defaultEntries: Entry[] = [ { date: "12 March 2026", title: "Designing Calm Interfaces for Busy Teams", href: "#" }, { date: "04 March 2026", title: "Notes on Type, Rhythm & Whitespace", href: "#" }, { date: "21 February 2026", title: "Why Prototypes Beat Slide Decks", href: "#" }, { date: "09 February 2026", title: "A Field Guide to Motion Systems", href: "#" }, ]; function Arrow() { return ( <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.2" aria-hidden="true" className="transition-transform duration-gallery-smooth-slide ease-gallery-smooth-slide group-hover:translate-x-1" > <path d="M2 7h10M8 3l4 4-4 4" /> </svg> ); } export default function DatedJournalTickerList({ label = "Journal", seeAllLabel = "See all", seeAllHref = "#", entries = defaultEntries, }: Props) { return ( <section aria-label={label} className="w-full max-w-sm bg-background font-sans text-foreground"> <div className="flex items-center justify-between border-b border-foreground pb-2"> <h2 className="text-gallery-label uppercase tracking-[0.2em] text-[10px]">{label}</h2> <a href={seeAllHref} className="group inline-flex items-center gap-2 text-[10px] font-medium uppercase tracking-[0.12em] focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-4 focus-visible:outline-foreground" > {seeAllLabel} <Arrow /> </a> </div> <Stagger step={80} from="up" distance={12} as="ul" className="flex flex-col"> {entries.map((e, i) => ( <li key={i} className="border-b border-border last:border-b-0"> <a href={e.href ?? "#"} className="group block py-3 transition-transform duration-gallery-smooth-slide ease-gallery-smooth-slide hover:translate-x-1 focus-visible:outline focus-visible:outline-1 focus-visible:outline-foreground" > <time className="block text-[9px] uppercase tracking-[0.18em] text-foreground/70">{e.date}</time> <span className="mt-1 block text-[12px] leading-snug underline decoration-transparent underline-offset-4 transition-colors duration-gallery-hover-fill ease-gallery-hover-fill group-hover:decoration-foreground"> {e.title} </span> </a> </li> ))} </Stagger> </section> ); } // ---- Yoink motion (inlined, no dependencies): Stagger ---- 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; } /** Reveals each direct child one after another when the group scrolls into view. */ function Stagger({ children, step = 90, from = "up", distance = 20, duration = 650, delay = 0, once = true, as = "div", className, style, }: { children?: ReactNode; step?: number; from?: "up" | "down" | "left" | "right" | "scale" | "fade"; distance?: number; duration?: number; delay?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); useYkLayoutEffect(() => { const items = Array.from(ref.current?.children ?? []) as HTMLElement[]; if (state === "idle") return; 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.92)", fade: "none", }[from]; if (state === "hidden") { for (const el of items) Object.assign(el.style, { transition: "none", opacity: "0", transform: offset }); return; } items.forEach((el, i) => { const t = `${duration}ms ${YK_EASE} ${delay + i * step}ms`; Object.assign(el.style, { transition: `opacity ${t}, transform ${t}`, opacity: "", transform: "" }); }); // hand the children their own transitions back once everything has landed const done = setTimeout(() => items.forEach((el) => (el.style.transition = "")), delay + items.length * step + duration + 50); return () => clearTimeout(done); }, [state]); return ( <Tag ref={ref} className={className} style={style}> {children} </Tag> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: not passedElements must meet minimum color contrast ratio thresholds (4 elements)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- 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.