Sticky-date Changelog Entry
Two-column entry: left sticky column with white title and grey relative date ('Yesterday', '2 weeks ago'); right 800px column with a 16:9 rounded-20px black media frame (looping video, glowing UI or shader render) followed by grey paragraph copy with white underlined inline links and mono code chips.
Rebuilt from framer.com/updates in the Obsidian Canvas style.
Looks exactly like framer.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 and date fill the sticky left column; rows customizes the three workflow cards in the 16:9 frame (set active on one for the blue glow). Renders standalone with defaults.
components/changelog-entry.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Row = { title: string; sub: string; icon: "bolt" | "chart" | "card"; apps: ("hash" | "n" | "grid")[]; active?: boolean }; type Props = { title?: string; date?: string; rows?: Row[]; }; const defaultRows: Row[] = [ { title: "Release alert", sub: "On deploy", icon: "bolt", apps: ["hash"] }, { title: "Monthly digest", sub: "Monthly on Fri at 9:00 AM", icon: "chart", apps: ["hash", "n", "grid"], active: true }, { title: "Signup routing", sub: "On new signup", icon: "card", apps: ["grid", "n", "hash"] }, ]; function RowIcon({ k }: { k: Row["icon"] }) { return ( <svg viewBox="0 0 24 24" className="h-6 w-6 text-muted" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> {k === "bolt" && <path d="M13 3 5 14h6l-1 7 8-11h-6z" />} {k === "chart" && <path d="M5 20V12M12 20V6M19 20V10" />} {k === "card" && <><rect x="3" y="5" width="18" height="14" rx="2" /><path d="M8 11h3M8 15h6" /></>} </svg> ); } function App({ k }: { k: "hash" | "n" | "grid" }) { return ( <span className="flex h-9 w-9 items-center justify-center rounded-md border border-hairline-soft bg-canvas sm:h-12 sm:w-12"> {k === "hash" && ( <span className="grid grid-cols-2 gap-0.5"> <i className="h-2 w-2 rounded-full bg-accent-blue" /> <i className="h-2 w-2 rounded-full bg-success" /> <i className="h-2 w-2 rounded-full bg-primary" /> <i className="h-2 w-2 rounded-full bg-accent-deep-blue" /> </span> )} {k === "n" && <span className="font-display text-ui font-semibold text-primary">N</span>} {k === "grid" && <span className="h-4 w-5 rounded-sm bg-success" />} </span> ); } export default function StickyDateChangelogEntry({ title = "Workflows, Plugins, and Review Mode", date = "Yesterday", rows = defaultRows, }: Props) { return ( <section className="bg-canvas px-5 py-16 text-primary md:px-[120px]"> <div className="mx-auto flex max-w-[1200px] flex-col gap-8 md:flex-row md:gap-0"> <div className="md:w-[400px] md:shrink-0"> <div className="md:sticky md:top-24 md:max-w-[200px]"> <h2 className="text-ui font-medium text-primary">{title}</h2> <p className="text-ui text-muted">{date}</p> </div> </div> <Reveal from="scale" className="w-full md:max-w-[800px]"> <div className="relative aspect-video overflow-hidden rounded-[20px] border border-hairline bg-canvas p-3 sm:p-8"> <div className="flex h-full flex-col justify-center gap-2 sm:gap-3"> {rows.map((r) => ( <div key={r.title} className={ r.active ? "relative flex items-center gap-3 rounded-xl border border-accent-blue bg-surface p-2 shadow-blue-glow sm:gap-4 sm:p-3" : "flex items-center gap-3 rounded-xl border border-hairline bg-surface p-2 sm:gap-4 sm:p-3" } > <span className="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-surface-raised sm:h-16 sm:w-16"> <RowIcon k={r.icon} /> </span> <div className="min-w-0 flex-1"> <p className="truncate text-ui text-primary sm:text-lead">{r.title}</p> <p className="truncate text-caption text-secondary sm:text-lead">{r.sub}</p> </div> <div className="flex gap-2"> {r.apps.map((a, i) => ( <App key={i} k={a} /> ))} </div> </div> ))} </div> </div> <p className="mt-8 text-body text-secondary"> Introducing{" "} <a href="#" className="text-primary underline underline-offset-4 decoration-faint hover:decoration-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue">Workflows</a>,{" "} <a href="#" className="text-primary underline underline-offset-4 decoration-faint hover:decoration-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue">Plugins</a>, and{" "} <a href="#" className="text-primary underline underline-offset-4 decoration-faint hover:decoration-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue">Review Mode</a>. Workflows are assistant routines that run by themselves. Trigger them on a schedule or from project events such as a release or a new signup. You choose which tools each routine may use and can inspect every earlier run. Mention{" "} <code className="rounded-sm bg-surface-raised px-1.5 py-0.5 font-mono text-caption text-primary">@Helper</code>{" "} in a channel to ask about your <code className="font-mono text-primary">project</code>, pull reports, or make small changes. To begin, open Settings and visit the Workflows tab. </p> </Reveal> </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 = { title: string; sub: string; icon: "bolt" | "chart" | "card"; apps: ("hash" | "n" | "grid")[]; active?: boolean }; type Props = { title?: string; date?: string; rows?: Row[]; }; const defaultRows: Row[] = [ { title: "Release alert", sub: "On deploy", icon: "bolt", apps: ["hash"] }, { title: "Monthly digest", sub: "Monthly on Fri at 9:00 AM", icon: "chart", apps: ["hash", "n", "grid"], active: true }, { title: "Signup routing", sub: "On new signup", icon: "card", apps: ["grid", "n", "hash"] }, ]; function RowIcon({ k }: { k: Row["icon"] }) { return ( <svg viewBox="0 0 24 24" className="h-6 w-6 text-muted-foreground" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> {k === "bolt" && <path d="M13 3 5 14h6l-1 7 8-11h-6z" />} {k === "chart" && <path d="M5 20V12M12 20V6M19 20V10" />} {k === "card" && <><rect x="3" y="5" width="18" height="14" rx="2" /><path d="M8 11h3M8 15h6" /></>} </svg> ); } function App({ k }: { k: "hash" | "n" | "grid" }) { return ( <span className="flex h-9 w-9 items-center justify-center rounded-md border border-border bg-background sm:h-12 sm:w-12"> {k === "hash" && ( <span className="grid grid-cols-2 gap-0.5"> <i className="h-2 w-2 rounded-full bg-primary" /> <i className="h-2 w-2 rounded-full bg-obsidian-success" /> <i className="h-2 w-2 rounded-full bg-foreground" /> <i className="h-2 w-2 rounded-full bg-obsidian-accent-deep-blue" /> </span> )} {k === "n" && <span className="font-sans text-obsidian-ui font-semibold text-foreground">N</span>} {k === "grid" && <span className="h-4 w-5 rounded-md bg-obsidian-success" />} </span> ); } export default function StickyDateChangelogEntry({ title = "Workflows, Plugins, and Review Mode", date = "Yesterday", rows = defaultRows, }: Props) { return ( <section className="bg-background px-5 py-16 text-foreground md:px-[120px]"> <div className="mx-auto flex max-w-[1200px] flex-col gap-8 md:flex-row md:gap-0"> <div className="md:w-[400px] md:shrink-0"> <div className="md:sticky md:top-24 md:max-w-[200px]"> <h2 className="text-obsidian-ui font-medium text-foreground">{title}</h2> <p className="text-obsidian-ui text-muted-foreground">{date}</p> </div> </div> <Reveal from="scale" className="w-full md:max-w-[800px]"> <div className="relative aspect-video overflow-hidden rounded-[20px] border border-border bg-background p-3 sm:p-8"> <div className="flex h-full flex-col justify-center gap-2 sm:gap-3"> {rows.map((r) => ( <div key={r.title} className={ r.active ? "relative flex items-center gap-3 rounded-2xl border border-primary bg-card p-2 shadow-obsidian-blue-glow sm:gap-4 sm:p-3" : "flex items-center gap-3 rounded-2xl border border-border bg-card p-2 sm:gap-4 sm:p-3" } > <span className="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-secondary sm:h-16 sm:w-16"> <RowIcon k={r.icon} /> </span> <div className="min-w-0 flex-1"> <p className="truncate text-obsidian-ui text-foreground sm:text-obsidian-lead">{r.title}</p> <p className="truncate text-obsidian-caption text-muted-foreground sm:text-obsidian-lead">{r.sub}</p> </div> <div className="flex gap-2"> {r.apps.map((a, i) => ( <App key={i} k={a} /> ))} </div> </div> ))} </div> </div> <p className="mt-8 text-obsidian-body text-muted-foreground"> Introducing{" "} <a href="#" className="text-foreground underline underline-offset-4 decoration-muted-foreground hover:decoration-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary">Workflows</a>,{" "} <a href="#" className="text-foreground underline underline-offset-4 decoration-muted-foreground hover:decoration-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary">Plugins</a>, and{" "} <a href="#" className="text-foreground underline underline-offset-4 decoration-muted-foreground hover:decoration-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary">Review Mode</a>. Workflows are assistant routines that run by themselves. Trigger them on a schedule or from project events such as a release or a new signup. You choose which tools each routine may use and can inspect every earlier run. Mention{" "} <code className="rounded-md bg-secondary px-1.5 py-0.5 font-mono text-obsidian-caption text-foreground">@Helper</code>{" "} in a channel to ask about your <code className="font-mono text-foreground">project</code>, pull reports, or make small changes. To begin, open Settings and visit the Workflows tab. </p> </Reveal> </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 · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: not passedScrolls sideways at tablet width (768px)
- 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.