File Reference

A compact card that cites a source file with its name, monospace path and line range. Useful for code assistants, docs and AI answers that point into a repo.

src/registry/ui/file-reference.tsx/r/file-reference.json

Installation#

bash
npx shadcn@latest add @minidev/file-reference

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/file-reference.json

Usage#

tsx
import { FileReference } from "@/components/ui/file-reference"

export function Example() {
  return <FileReference />
}

API reference#

FileReference props
PropTypeDefault
namestring"hero-client-pitch.tsx"
pathstring"src/registry/premium/hero-client-pit...
linesstring"1–92"
classNamestring-

Dependencies#

npm

lucide-react

Built from

No other MiniDev files
All Developer tool UI components for React