BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/neon-ui/inline-citation

InlineCitation

neon-ui/inline-citation
FreeComponent

Inline source pill that previews stacked citations on hover and links to the source on click.

Install it

npx shadcn@latest add https://ui.neon.com/r/inline-citation.json

Source

src/components/inline-citation/inline-citation.tsxui.neon.com/r/inline-citation.json · first 6 KB
1"use client";
2
3import { PreviewCard } from "@base-ui/react/preview-card";
4import type { ComponentProps } from "react";
5import { useState } from "react";
6
7import { cn } from "@/lib/utils";
8
9/** Strip a URL down to its readable hostname. */
10const hostnameOf = (url: string): string => {
11 try {
12 return new URL(url).hostname.replace(/^www\./u, "");
13 } catch {
14 return url;
15 }
16};
17
18const faviconOf = (url: string): string | null => {
19 try {
20 const host = new URL(url).hostname;
21 return `https://www.google.com/s2/favicons?domain=${host}&sz=64`;
22 } catch {
23 return null;
24 }
25};
26
27/**
28 * The source site's favicon, resolved through Google's favicon
29 * service. Decorative — vanishes silently if it fails to load, so
30 * the pill never shows a broken-image glyph.
31 */
32const SourceFavicon = ({
33 className,
34 url,
35}: {
36 url: string;
37 className?: string;
38}) => {
39 const [failed, setFailed] = useState(false);
40 const src = faviconOf(url);
41
42 if (!src || failed) {
43 return null;
44 }
45
46 return (
47 // oxlint-disable-next-line react/no-unknown-property -- plain img: registry components stay framework-agnostic
48 <img
49 alt=""
50 aria-hidden="true"
51 className={cn("size-3 shrink-0 select-none rounded-[2px]", className)}
52 data-slot="inline-citation-favicon"
53 loading="lazy"
54 onError={() => setFailed(true)}
55 src={src}
56 />
57 );
58};
59
60export type InlineCitationProps = ComponentProps<"span">;
61
62/* ─────────────────────────────────────────────────────
63 * A sourced claim inline with prose: the text reads
64 * normally, a small mono pill names where it came from,
65 * and hovering (or focusing) the pill previews the
66 * source without leaving the paragraph. Sources stack
67 * in one readable list — no carousel to page through.
68 * Inspired by Inline Citation from Vercel's AI SDK
69 * Elements (elements.ai-sdk.dev), rebuilt on Base UI.
70 * ─────────────────────────────────────────────────── */
71export const InlineCitation = ({
72 className,
73 ...props
74}: InlineCitationProps) => (
75 <span
76 className={cn("group/citation inline items-baseline", className)}
77 data-slot="inline-citation"
78 {...props}
79 />
80);
81
82export type InlineCitationTextProps = ComponentProps<"span">;
83
84/** The cited span itself; tints gently while its pill is hovered. */
85// … truncated

What it pulls in

npm packages

  • @base-ui/react

Other registry items

  • utils
  • https://ui.neon.com/r/neon-tokens.json

Files it writes

  • src/components/inline-citation/inline-citation.tsx

Facts

Registry
neon-ui
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

ui.neon.com neondatabase/ui on GitHub Raw registry item This item as JSON

More from neon-ui

All 77 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ActivityFeedactivity-feedneon-uiComponentsFree2 deps
AgentChatagent-chatneon-uiComponentsFree6 deps
AnimatedWashanimated-washneon-uiComponentsFreeno deps · 2 files
ApiKeyListapi-key-listneon-uiComponentsFree2 deps
AppCardapp-cardneon-uiComponentsFree2 deps
AppCreatorapp-creatorneon-uiComponentsFree2 deps
AuthFormauth-formneon-uiComponentsFreeno deps
AutoscaleChartautoscale-chartneon-uiComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex