Link Provider@astryxdesign/core v0.5.2 · LinkProvider
Install with shadcn
Experimental compatibility. This installs the real Astryx package and creates a local public re-export; it does not copy component implementation source. How compatibility works.
This install URL expires with the draft preview.bashnpx shadcn@latest add https://astryx-2z5i6c2u1-fbopensource.vercel.app/r/astryx-component-link-provider.json
Usage
Wraps your app to replace the default <a> tag with a framework-specific link component (e.g. Next.js Link) for client-side routing across all Astryx components.
tsimport {LinkProvider} from '@astryxdesign/core/Link'
Props
| Prop | Type | Description |
|---|---|---|
componentrequired | LinkComponentType | Link component to use for all link elements in the subtree (e.g. Next.js Link). |
childrenrequired | ReactNode | Content to render with the link provider. |
Examples
Common configurations, variations, and states.Link Provider — Custom Link Component
Routes every Astryx link through a custom component that intercepts the click, the hook frameworks like Next.js use for client-side navigation. Click the link to see the custom handler fire instead of a full-page load.