Home / Function/ NavFavorites() — ui Function Reference

NavFavorites() — ui Function Reference

Architecture documentation for the NavFavorites() function in nav-favorites.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  7cf11c79_57c2_9733_1dbd_c49a9c18b38b["NavFavorites()"]
  09b11072_395d_f8a4_221d_f5f616edd6e6["nav-favorites.tsx"]
  7cf11c79_57c2_9733_1dbd_c49a9c18b38b -->|defined in| 09b11072_395d_f8a4_221d_f5f616edd6e6
  style 7cf11c79_57c2_9733_1dbd_c49a9c18b38b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/blocks/sidebar-15/components/nav-favorites.tsx lines 21–130

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 asChild>
              <a href={item.url} title={item.name}>
                <span>{item.emoji}</span>
                <span>{item.name}</span>
              </a>
            </SidebarMenuButton>
            <DropdownMenu>
              <DropdownMenuTrigger asChild>
                <SidebarMenuAction
                  showOnHover
                  className="aria-expanded:bg-muted"
                >
                  <IconPlaceholder
                    lucide="MoreHorizontalIcon"
                    tabler="IconDots"
                    hugeicons="MoreHorizontalCircle01Icon"
                    phosphor="DotsThreeOutlineIcon"
                    remixicon="RiMoreLine"
                  />
                  <span className="sr-only">More</span>
                </SidebarMenuAction>
              </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

Subdomains

Frequently Asked Questions

What does NavFavorites() do?
NavFavorites() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/blocks/sidebar-15/components/nav-favorites.tsx.
Where is NavFavorites() defined?
NavFavorites() is defined in apps/v4/registry/bases/radix/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