NavFavorites() — ui Function Reference
Architecture documentation for the NavFavorites() function in nav-favorites.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD ef3c55ae_5481_c5c1_80b5_328186727472["NavFavorites()"] b82fe8e2_0344_d339_a128_b668775d1fe8["nav-favorites.tsx"] ef3c55ae_5481_c5c1_80b5_328186727472 -->|defined in| b82fe8e2_0344_d339_a128_b668775d1fe8 style ef3c55ae_5481_c5c1_80b5_328186727472 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/base/blocks/sidebar-15/components/nav-favorites.tsx lines 21–129
export function NavFavorites({
favorites,
}: {
favorites: {
name: string
url: string
emoji: string
}[]
}) {
const { isMobile } = useSidebar()
return (
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
<SidebarGroupLabel>Favorites</SidebarGroupLabel>
<SidebarMenu>
{favorites.map((item) => (
<SidebarMenuItem key={item.name}>
<SidebarMenuButton render={<a href={item.url} title={item.name} />}>
<span>{item.emoji}</span>
<span>{item.name}</span>
</SidebarMenuButton>
<DropdownMenu>
<DropdownMenuTrigger
render={
<SidebarMenuAction
showOnHover
className="aria-expanded:bg-muted"
/>
}
>
<IconPlaceholder
lucide="MoreHorizontalIcon"
tabler="IconDots"
hugeicons="MoreHorizontalCircle01Icon"
phosphor="DotsThreeOutlineIcon"
remixicon="RiMoreLine"
/>
<span className="sr-only">More</span>
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-56 rounded-lg"
side={isMobile ? "bottom" : "right"}
align={isMobile ? "end" : "start"}
>
<DropdownMenuItem>
<IconPlaceholder
lucide="StarOffIcon"
tabler="IconStarOff"
hugeicons="StarOffIcon"
phosphor="StarIcon"
remixicon="RiStarOffLine"
className="text-muted-foreground"
/>
<span>Remove from Favorites</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
<IconPlaceholder
lucide="LinkIcon"
tabler="IconLink"
hugeicons="LinkIcon"
phosphor="LinkIcon"
remixicon="RiLinksLine"
className="text-muted-foreground"
/>
<span>Copy Link</span>
</DropdownMenuItem>
<DropdownMenuItem>
<IconPlaceholder
lucide="ArrowUpRightIcon"
tabler="IconArrowUpRight"
hugeicons="ArrowUpRightIcon"
phosphor="ArrowUpRightIcon"
remixicon="RiArrowRightUpLine"
className="text-muted-foreground"
/>
<span>Open in New Tab</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
<IconPlaceholder
lucide="Trash2Icon"
Domain
Subdomains
Source
Frequently Asked Questions
What does NavFavorites() do?
NavFavorites() is a function in the ui codebase, defined in apps/v4/registry/bases/base/blocks/sidebar-15/components/nav-favorites.tsx.
Where is NavFavorites() defined?
NavFavorites() is defined in apps/v4/registry/bases/base/blocks/sidebar-15/components/nav-favorites.tsx at line 21.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free