Skip to content

Link Provider

@astryxdesign/core v0.7.1 · LinkProvider

Props ​

PropTypeDefaultDescription
componentLinkComponentType—Link component to use for all link elements in the subtree (e.g. RouterLink or NuxtLink). It receives href and to. A component's own as prop still wins. Required.

Slots ​

SlotDescription
defaultContent rendered with the link provider.

Exports ​

ExportTypeDescription
useLinkComponent() => ComputedRef<Component | undefined>The link component the nearest provider supplies, or undefined outside one. Use it as props.as ?? linkComponent.value so an explicit as still wins.

Components that follow the provider ​

These render their link through the provider unless they are given their own as:

  • Link, Button, Avatar, Token
  • NavItem, NavMenuItem, NavHeadingMenuItem, SideNavHeading, TopNavItem, TopNavMegaMenuItem, TopNavMegaMenuFeaturedCard
  • BreadcrumbItem, Tab, Item (List)
  • DropdownMenuItem, ContextMenuItem, MoreMenuRow, TreeListItem

Not routed through the provider: the AppShell skip link, Outline links (in-page anchors), ClickableCard (its overlay control is a visually hidden anchor), and links rendered from Markdown.

Native attributes ​

The component renders no element of its own, so class and style are not forwarded.