Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Sources
A collapsible list of cited sources.
import { Source, Sources, SourcesContent, SourcesTrigger } from "@/registry/default/shared/sources";
const sources = [
{ href: "https://example.com/react", title: "React documentation" },
{ href: "https://example.com/vite", title: "Vite guide" },
{ href: "https://example.com/tailwind", title: "Tailwind CSS reference" },
];
export default function Particle() {
return (
<Sources>
<SourcesTrigger count={sources.length} />
<SourcesContent>
{sources.map((source) => (
<Source href={source.href} key={source.href} title={source.title} />
))}
</SourcesContent>
</Sources>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/sources
Usage
import { Sources, SourcesTrigger, SourcesContent, Source } from "@/components/sources";API Reference
| Export | Props |
|---|---|
Sources | <div> attributes |
SourcesTrigger | CollapsibleTrigger props, plus its own options |
SourcesContent | CollapsibleContent props |
Source | <a> attributes |
Open the source under Manual above for the exact prop types.
On This Page