Aurora AI Sources
aurora-dinglebear-ai/aurora-ai-sourcesFreeBlock
Aurora-native sources parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-sources.jsonSource
1"use client"23import * as React from "react"4import { ChevronDown, FileText } from "lucide-react"5import { Badge } from "@/registry/aurora/ui/badge"6import { Button } from "@/registry/aurora/ui/button"7import { Source, type SourceItem, type SourceProps } from "@/registry/aurora/blocks/ai/elements/source"89// ---------------------------------------------------------------------------10// Types (architecture source of truth — keep the existing registry API)11// ---------------------------------------------------------------------------1213export interface SourcesProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {14 title?: React.ReactNode15 /** Render the count badge + chevron and allow the body to collapse. */16 collapsible?: boolean17 /** Control the collapsed state (uncontrolled defaults to expanded). */18 open?: boolean19 defaultOpen?: boolean20 onOpenChange?: (open: boolean) => void21}2223export type { SourceItem, SourceProps }2425// ---------------------------------------------------------------------------26// Shared surface helpers (ported from CD injected CSS)27// ---------------------------------------------------------------------------2829function panelStyle(style?: React.CSSProperties): React.CSSProperties {30 return {31 background: "var(--aurora-surface-raised)",32 border: "1px solid var(--aurora-border-strong)",33 borderRadius: "var(--aurora-radius-1)",34 boxShadow: "var(--aurora-shadow-medium), var(--aurora-highlight-medium)",35 ...style,36 }37}383940// ---------------------------------------------------------------------------41// Count badge — small neutral pill next to the title42// ---------------------------------------------------------------------------4344function CountBadge({ count }: { count: number }) {45 return (46 <Badge47 tone="neutral"48 fill="outline"49 className="min-w-[22px] justify-center px-1.5 tabular-nums"50 >51 {count}52 </Badge>53 )54}5556// ---------------------------------------------------------------------------57// Sources — bordered panel with file icon, title, count badge, collapsible body58// ---------------------------------------------------------------------------5960const Sources = (61 { ref,62 className,63 title = "Sources",64 collapsible = false,65 open: openProp,66 defaultOpen = true,67 onOpenChange,68 style,69 children,70 ...props71 }: SourcesProps & { ref?: React.Ref<HTMLDivElement> }72 ) => {73// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Free | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Free | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Free | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Free | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Free | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Free | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Free | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Free | 1 dep |
