MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / NavLink

Function NavLink

src/components/Navigation.tsx:35–64  ·  view source on GitHub ↗
({
  href,
  children,
  tag,
  active = false,
  isAnchorLink = false,
}: {
  href: string
  children: React.ReactNode
  tag?: string
  active?: boolean
  isAnchorLink?: boolean
})

Source from the content-addressed store, hash-verified

33}
34
35function NavLink({
36 href,
37 children,
38 tag,
39 active = false,
40 isAnchorLink = false,
41}: {
42 href: string
43 children: React.ReactNode
44 tag?: string
45 active?: boolean
46 isAnchorLink?: boolean
47}) {
48 return (
49 <Link
50 href={href}
51 aria-current={active ? 'page' : undefined}
52 className={clsx(
53 'flex justify-between gap-2 py-1 pr-3 text-sm transition',
54 isAnchorLink ? 'pl-7' : 'pl-4',
55 active
56 ? 'text-gray-900 dark:text-white'
57 : 'text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white',
58 )}
59 >
60 <span className="truncate">{children}</span>
61 {tag && <Tag>{tag}</Tag>}
62 </Link>
63 )
64}
65
66function VisibleSectionHighlight({
67 group,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected