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

Relationship Graph

Source Code

apps/v4/registry/bases/base/blocks/sidebar-10/components/nav-favorites.tsx lines 22–134

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"}
              >
                <DropdownMenuGroup>
                  <DropdownMenuItem>
                    <IconPlaceholder
                      lucide="StarOffIcon"
                      tabler="IconStarOff"
                      hugeicons="StarOffIcon"
                      phosphor="StarIcon"
                      remixicon="RiStarOffLine"
                      className="text-muted-foreground"
                    />
                    <span>Remove from Favorites</span>
                  </DropdownMenuItem>
                </DropdownMenuGroup>
                <DropdownMenuSeparator />
                <DropdownMenuGroup>
                  <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 />

Subdomains

Frequently Asked Questions

What does NavFavorites() do?
NavFavorites() is a function in the ui codebase, defined in apps/v4/registry/bases/base/blocks/sidebar-10/components/nav-favorites.tsx.
Where is NavFavorites() defined?
NavFavorites() is defined in apps/v4/registry/bases/base/blocks/sidebar-10/components/nav-favorites.tsx at line 22.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free