VexLink
constVexLink:ForwardRefExoticComponent<VexLinkProps&RefAttributes<HTMLAnchorElement>>
Defined in: packages/react/src/components/ui/VexLink.tsx:39
Framework-aware link component.
Renders the Link component from FrameworkComponentsContext if one is
configured (e.g. Next.js NextLink, TanStack Router wrapper), otherwise
falls back to a native <a> tag. All props are forwarded.
In Base UI components, pass via the render prop rather than as a child:
<SidebarMenuButton render={<VexLink href="/admin/posts" />}> Posts</SidebarMenuButton>Base UI’s useRender merges the button’s styles and state into the element.
props
Accepts href plus any standard HTML anchor attributes
Returns
Section titled “Returns”A link element rendered by the injected framework component or <a>
Example
Section titled “Example”// Standalone<VexLink href="/admin/posts">Posts</VexLink>
// As Base UI render prop (sidebar nav)<SidebarMenuButton render={<VexLink href="/admin/posts" />} isActive> Posts</SidebarMenuButton>