Six-Column Link Footer
Below a red diagonal-ribbon artwork, six columns (Product, Core Features, Top Extensions, Company, Community, By Raycast) with white headers and grey links, some with small external arrows, ending with a newsletter row: email input and light Subscribe button.
Rebuilt from raycast.com/pricing in the Obsidian Launcher style.
Looks exactly like raycast.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
Pass `columns` (array of {title, links:[{label, external?}]}) plus newsletterTitle, newsletterText, placeholder and disclaimer strings; all have defaults so it renders with no props.
components/multi-column-footer.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; type Link = { label: string; external?: boolean }; type Column = { title: string; links: Link[] }; const defaultColumns: Column[] = [ { title: "Platform", links: ["Overview", "Plans", "Studio", "Rates", "Release notes", "Desktop app", "Builders", "Mobile", "Version 3.0", { label: "Reference", external: true }, { label: "Handbook", external: true }, "Tutorials", "Compare tools", "Questions"].map((l) => (typeof l === "string" ? { label: l } : l)) }, { title: "Highlights", links: ["Assistant", "Journal", "Focus mode", "History", "Layouts", "Shortcuts", "Search", "Shortcodes", "Math", "Agenda", "Status", "Symbols", { label: "Connector", external: true }].map((l) => (typeof l === "string" ? { label: l } : l)) }, { title: "Add-ons", links: ["Design", "Engineering", "Timers", "Planning", "Task Boards", "Scheduling", "Notes", "Languages", "Remote Work", "Automation"].map((label) => ({ label })) }, { title: "Organization", links: ["Vision", "Clients", "Jobs", "Terms", "Privacy", "Usage Rules", "Agreements", { label: "Security Hub", external: true }, "Brand Assets", "Reach Us"].map((l) => (typeof l === "string" ? { label: l } : l)) }, { title: "Network", links: ["Member Stories", "Advocates", "Chat Room", { label: "Social", external: true }, { label: "Code Host", external: true }, { label: "Portfolio", external: true }] }, { title: "More Tools", links: ["Typing Gear", { label: "Browser", external: true }, { label: "Templates", external: true }, { label: "Recipes", external: true }, { label: "Short Links", external: true }, { label: "Prompt Packs", external: true }, "Backgrounds"].map((l) => (typeof l === "string" ? { label: l } : l)) }, ]; export default function SixColumnLinkFooter({ columns = defaultColumns, newsletterTitle = "Join our mailing list.", newsletterText = "A short monthly digest of releases and tips. Nothing else.", placeholder = "you@example.com", disclaimer = "By signing up you consent to receive our monthly digest. See the privacy page for details. Unsubscribe whenever you like.", }: { columns?: Column[]; newsletterTitle?: string; newsletterText?: string; placeholder?: string; disclaimer?: string; }) { const [email, setEmail] = useState(""); return ( <footer className="relative isolate overflow-hidden bg-canvas text-secondary font-sans"> <div className="relative h-[200px] border-b border-hairline overflow-hidden" aria-hidden="true"> <div className="absolute left-1/2 top-0 h-[400px] w-[640px] -translate-x-1/2 opacity-70"> <svg viewBox="0 0 640 200" className="h-[200px] w-full"> <defs> <linearGradient id="rb" x1="0" y1="0" x2="1" y2="1"> <stop offset="0" stopColor="#8a0f1c" /> <stop offset="1" stopColor="#07080a" stopOpacity="0.2" /> </linearGradient> </defs> <polygon points="20,60 150,200 20,200" fill="url(#rb)" /> <polygon points="100,0 330,200 200,200" fill="url(#rb)" opacity="0.8" /> <polygon points="220,20 450,200 360,200" fill="url(#rb)" opacity="0.6" /> <polygon points="360,40 520,200 470,200" fill="url(#rb)" opacity="0.5" /> </svg> </div> <div className="absolute inset-x-0 bottom-0 h-24 bg-gradient-to-b from-transparent to-canvas" /> </div> <div className="absolute left-1/2 top-[200px] -z-10 h-64 w-[60%] -translate-x-1/2 rounded-full bg-accent-red/10 blur-[80px]" /> <div className="mx-auto max-w-[1064px] px-6 pt-20 pb-16"> <Reveal from="up"> <nav aria-label="Footer" className="grid grid-cols-2 gap-x-6 gap-y-12 sm:grid-cols-3 lg:grid-cols-6"> {columns.map((col) => ( <div key={col.title}> <h3 className="text-ui font-medium text-primary">{col.title}</h3> <ul className="mt-8 space-y-4"> {col.links.map((l) => ( <li key={l.label}> <a href="#" className="group inline-flex items-center gap-2 text-ui text-secondary transition-colors duration-200 hover:text-primary focus-visible:text-primary focus-visible:outline-none focus-visible:underline"> {l.label} {l.external && ( <svg width="8" height="8" viewBox="0 0 8 8" fill="none" stroke="currentColor" className="opacity-60 transition-transform duration-200 group-hover:translate-x-0.5" aria-hidden="true"> <path d="M1 7L7 1M2.5 1H7v4.5" /> </svg> )} </a> </li> ))} </ul> </div> ))} </nav> </Reveal> <div className="mt-20 grid gap-8 border-t border-hairline pt-12 md:grid-cols-2"> <div> <p className="text-ui font-medium text-primary">{newsletterTitle}</p> <p className="mt-1 max-w-xs text-ui text-secondary">{newsletterText}</p> </div> <form onSubmit={(e) => e.preventDefault()}> <div className="flex gap-4"> <label className="sr-only" htmlFor="footer-email">Email address</label> <input id="footer-email" type="email" value={email} onChange={(e) => setEmail(e.target.value)} placeholder={placeholder} className="h-10 min-w-0 flex-1 rounded-lg border border-hairline bg-surface-elevated px-3 text-ui text-primary placeholder:text-tertiary focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-red/60" /> <button type="submit" className="h-10 rounded-lg bg-button-light px-6 text-ui font-medium text-surface-elevated transition-all duration-200 hover:bg-white hover:shadow-button-light-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary">Subscribe</button> </div> <p className="mt-4 text-caption text-tertiary">{disclaimer}</p> </form> </div> </div> </footer> ); } // ---- 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, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; type Link = { label: string; external?: boolean }; type Column = { title: string; links: Link[] }; const defaultColumns: Column[] = [ { title: "Platform", links: ["Overview", "Plans", "Studio", "Rates", "Release notes", "Desktop app", "Builders", "Mobile", "Version 3.0", { label: "Reference", external: true }, { label: "Handbook", external: true }, "Tutorials", "Compare tools", "Questions"].map((l) => (typeof l === "string" ? { label: l } : l)) }, { title: "Highlights", links: ["Assistant", "Journal", "Focus mode", "History", "Layouts", "Shortcuts", "Search", "Shortcodes", "Math", "Agenda", "Status", "Symbols", { label: "Connector", external: true }].map((l) => (typeof l === "string" ? { label: l } : l)) }, { title: "Add-ons", links: ["Design", "Engineering", "Timers", "Planning", "Task Boards", "Scheduling", "Notes", "Languages", "Remote Work", "Automation"].map((label) => ({ label })) }, { title: "Organization", links: ["Vision", "Clients", "Jobs", "Terms", "Privacy", "Usage Rules", "Agreements", { label: "Security Hub", external: true }, "Brand Assets", "Reach Us"].map((l) => (typeof l === "string" ? { label: l } : l)) }, { title: "Network", links: ["Member Stories", "Advocates", "Chat Room", { label: "Social", external: true }, { label: "Code Host", external: true }, { label: "Portfolio", external: true }] }, { title: "More Tools", links: ["Typing Gear", { label: "Browser", external: true }, { label: "Templates", external: true }, { label: "Recipes", external: true }, { label: "Short Links", external: true }, { label: "Prompt Packs", external: true }, "Backgrounds"].map((l) => (typeof l === "string" ? { label: l } : l)) }, ]; export default function SixColumnLinkFooter({ columns = defaultColumns, newsletterTitle = "Join our mailing list.", newsletterText = "A short monthly digest of releases and tips. Nothing else.", placeholder = "you@example.com", disclaimer = "By signing up you consent to receive our monthly digest. See the privacy page for details. Unsubscribe whenever you like.", }: { columns?: Column[]; newsletterTitle?: string; newsletterText?: string; placeholder?: string; disclaimer?: string; }) { const [email, setEmail] = useState(""); return ( <footer className="relative isolate overflow-hidden bg-background text-muted-foreground font-sans"> <div className="relative h-[200px] border-b border-border overflow-hidden" aria-hidden="true"> <div className="absolute left-1/2 top-0 h-[400px] w-[640px] -translate-x-1/2 opacity-70"> <svg viewBox="0 0 640 200" className="h-[200px] w-full"> <defs> <linearGradient id="rb" x1="0" y1="0" x2="1" y2="1"> <stop offset="0" stopColor="#8a0f1c" /> <stop offset="1" stopColor="var(--color-background)" stopOpacity="0.2" /> </linearGradient> </defs> <polygon points="20,60 150,200 20,200" fill="url(#rb)" /> <polygon points="100,0 330,200 200,200" fill="url(#rb)" opacity="0.8" /> <polygon points="220,20 450,200 360,200" fill="url(#rb)" opacity="0.6" /> <polygon points="360,40 520,200 470,200" fill="url(#rb)" opacity="0.5" /> </svg> </div> <div className="absolute inset-x-0 bottom-0 h-24 bg-gradient-to-b from-transparent to-background" /> </div> <div className="absolute left-1/2 top-[200px] -z-10 h-64 w-[60%] -translate-x-1/2 rounded-full bg-primary/10 blur-[80px]" /> <div className="mx-auto max-w-[1064px] px-6 pt-20 pb-16"> <Reveal from="up"> <nav aria-label="Footer" className="grid grid-cols-2 gap-x-6 gap-y-12 sm:grid-cols-3 lg:grid-cols-6"> {columns.map((col) => ( <div key={col.title}> <h3 className="text-obsidian-ui font-medium text-foreground">{col.title}</h3> <ul className="mt-8 space-y-4"> {col.links.map((l) => ( <li key={l.label}> <a href="#" className="group inline-flex items-center gap-2 text-obsidian-ui text-muted-foreground transition-colors duration-200 hover:text-foreground focus-visible:text-foreground focus-visible:outline-none focus-visible:underline"> {l.label} {l.external && ( <svg width="8" height="8" viewBox="0 0 8 8" fill="none" stroke="currentColor" className="opacity-60 transition-transform duration-200 group-hover:translate-x-0.5" aria-hidden="true"> <path d="M1 7L7 1M2.5 1H7v4.5" /> </svg> )} </a> </li> ))} </ul> </div> ))} </nav> </Reveal> <div className="mt-20 grid gap-8 border-t border-border pt-12 md:grid-cols-2"> <div> <p className="text-obsidian-ui font-medium text-foreground">{newsletterTitle}</p> <p className="mt-1 max-w-xs text-obsidian-ui text-muted-foreground">{newsletterText}</p> </div> <form onSubmit={(e) => e.preventDefault()}> <div className="flex gap-4"> <label className="sr-only" htmlFor="footer-email">Email address</label> <input id="footer-email" type="email" value={email} onChange={(e) => setEmail(e.target.value)} placeholder={placeholder} className="h-10 min-w-0 flex-1 rounded-xl border border-border bg-popover px-3 text-obsidian-ui text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60" /> <button type="submit" className="h-10 rounded-xl bg-primary px-6 text-obsidian-ui font-medium text-popover transition-all duration-200 hover:bg-primary hover:shadow-obsidian-button-light-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground">Subscribe</button> </div> <p className="mt-4 text-obsidian-caption text-muted-foreground">{disclaimer}</p> </form> </div> </div> </footer> ); } // ---- 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: not passedElements must meet minimum color contrast ratio thresholds (1 element)Links must have discernible text (3 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.