Link Provider
@astryxdesign/core v0.7.1 · LinkProvider
Props
| Prop | Type | Default | Description |
|---|---|---|---|
component | LinkComponentType | — | 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
| Slot | Description |
|---|---|
default | Content rendered with the link provider. |
Exports
| Export | Type | Description |
|---|---|---|
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,TokenNavItem,NavMenuItem,NavHeadingMenuItem,SideNavHeading,TopNavItem,TopNavMegaMenuItem,TopNavMegaMenuFeaturedCardBreadcrumbItem,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.