About
A live research list: the sources an agent has read, a check on the ones it kept, a spinner on the one it is reading now, a status chip and two counters. Part of Midnight, the full template on 21st; also in the free Midnight Lite (MIT).
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Research Sources List to your project and fits it to your theme.
Code
How AI Research Sources List is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { useSyncExternalStore, type CSSProperties } from "react"
import { ResearchFeed } from "@/components/ui/research-feed"
const geist = "@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400..600&family=Geist+Mono:wght@400..500&display=swap');"
// Midnight by day: warm paper, a white card, night-blue ink, deep gold for the label and the source being read
const settings = {
background: "#f7f5f0",
card: "#ffffff",
text: "#141a2e",
muted: "#4a5166",
accent: "#a8803a",
accentText: "#ffffff",
label: "#8a6a2e",
}
// Midnight by night, the template's own palette
const night: Partial<typeof settings> = {
background: "#0b1020",
card: "#111731",
text: "#ece9e1",
muted: "#a9afc4",
accent: "#d9b77e",
accentText: "#0b1020",
label: "#e3c592",
}
// 21st marks its dark theme with .dark on <html>; the demo answers with Midnight by night
function useDark() {
return useSyncExternalStore(
(on) => {
const watch = new MutationObserver(on)
watch.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] })
return () => watch.disconnect()
},
() => document.documentElement.classList.contains("dark"),
() => false,
)
}
// the palette as theme tokens; the component itself only reads the tokens
function tokens(s: typeof settings) {
const t: Record<string, string> = {
background: s.background,
foreground: s.text,
card: s.card,
primary: s.accent,
"primary-foreground": s.accentText,
"muted-foreground": s.muted,
}
return Object.fromEntries(Object.entries(t).flatMap(([k, v]) => [[`--${k}`, v], [`--color-${k}`, v]])) as CSSProperties
}
// the template's card: white and lifted by day, a deep tile with a lit top edge by night
function card(s: typeof settings, dark: boolean): CSSProperties {
return dark
? {
background: `linear-gradient(180deg, color-mix(in oklab, ${s.card} 80%, ${s.background}), color-mix(in oklab, ${s.card} 62%, ${s.background}))`,
boxShadow: "inset 0 1px 0 0 rgb(255 255 255 / 0.09), inset 0 0 0 1px rgb(255 255 255 / 0.045), 0 14px 28px -18px rgb(0 0 0 / 0.55)",
}
: { background: s.card, boxShadow: "inset 0 0 0 1px rgb(20 26 46 / 0.07), 0 1px 2px rgb(20 26 46 / 0.05), 0 16px 32px -20px rgb(20 26 46 / 0.22)" }
}
export default function Demo(props: Partial<typeof settings>) {
const dark = useDark()
const s = { ...settings, ...props, ...(dark ? night : {}) }
return (
<div
className="flex min-h-svh w-full items-center justify-center px-5 py-12"
style={{ ...tokens(s), fontFamily: "Geist, ui-sans-serif, system-ui, sans-serif", background: s.background, color: s.text } as CSSProperties}
>
<style>{geist}</style>
<div className="w-full max-w-[640px] rounded-[28px] p-8 md:p-10" style={card(s, dark)}>
<p className="text-[14px] font-medium" style={{ color: s.label }}>
Research
</p>
<h3 className="mt-3 max-w-[520px] text-[26px] leading-[32px] font-semibold tracking-[-0.025em] text-balance md:text-[30px] md:leading-[36px]">
<span>Research while you sleep.</span> <span style={{ color: s.muted }}>Scout keeps only what answers your question.</span>
</h3>
<ResearchFeed
className="mt-8"
fade={false}
status="Scout is reading"
read="212 read"
kept="14 kept"
rows={[
{ title: "Billing error on invoice 4471", where: "tickets/8812" },
{ title: "How refunds are calculated", where: "help/refunds" },
{ title: "Invoice template v3 notes", where: "docs/changelog" },
{ title: "Q3 pricing update", where: "drive/finance", reading: true },
]}
/>
</div>
</div>
)
}















