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
  e7f7f227_97e1_f9a8_b10a_2acf168a9c37["NavFavorites()"]
  f5822b89_3410_9b81_667e_6501d4e53594["nav-favorites.tsx"]
  e7f7f227_97e1_f9a8_b10a_2acf168a9c37 -->|defined in| f5822b89_3410_9b81_667e_6501d4e53594
  style e7f7f227_97e1_f9a8_b10a_2acf168a9c37 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/blocks/sidebar-10/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-10/components/nav-favorites.tsx.
Where is NavFavorites() defined?
NavFavorites() is defined in apps/v4/registry/bases/radix/blocks/sidebar-10/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