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). It receives accepted |
childrenrequired | ReactNode | The subtree. Astryx links in it that render through |
Examples
Common configurations, variations, and states.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.