
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@kwooshung/nextjs-arcodesign-link
Advanced tools
About In Next.js projects, the official recommendation is to use the Next.js Link component for navigation. However, integrating Arco Design's Link component within Next.js can be cumbersome. This component resolves this issue, offering full compatibility
In Next.js projects, it's officially recommended to use the Next.js Link component for navigation. However, integrating the Arco Design Link component in Next.js can be cumbersome. This component resolves this issue by offering full compatibility with the properties of both frameworks, thereby simplifying integration for developers.
rel='noopener noreferrer'
to prevent window.opener attacks and improve security;rel='noopener noreferrer'
needs to be added;npm install @kwooshung/nextjs-arcodesign-link
yarn add @kwooshung/nextjs-arcodesign-link
pnpm add @kwooshung/nextjs-arcodesign-link
import { Link } from '@kwooshung/nextjs-arcodesign-link';
const App = () => {
return (
<LinkProvider>
<Link href='#' status='error'>
Error Link
</Link>
<Link href='#' status='error' disabled>
Error Link
</Link>
<Link href='#' status='success'>
Success Link
</Link>
<Link href='#' status='success' disabled>
Success Link
</Link>
<Link href='#' status='warning'>
Warning Link
</Link>
<Link href='#' status='warning' disabled>
Warning Link
</Link>
</LinkProvider>
);
};
export default App;
The link component combines all the properties of the Link component of NextJs and the Link component of Arco Design.
Property | Description | Type | DefaultValue |
---|---|---|---|
whitelist | Global link whitelist, automatically determines whether to add rel='noopener noreferrer' | string[] | ['zhidi.vip', 'wozhidi.vip', 'wozhidi.com', 'google.com', 'bing.com', 'baidu.com', 'yandex.ru', 'duckduckgo.com', 'yahoo.com', 'facebook.com', 'twitter.com', 'instagram.com', 'linkedin.com', 'weibo.com', 'zhihu.com', 'mp.weixin.qq.com', 'tiktok.com', 'douyin.com', 'pinterest.com', 'reddit.com', 'snapchat.com', 'telegram.org', 'vk.com'] |
link | Custom link component, used to replace the default link component; for example, some internationalized components with routing functions will export dedicated Link | Link | - |
Property | Description | Type | DefaultValue | Version |
---|---|---|---|---|
disabled | Whether to disable | boolean | - | - |
hoverable | Whether to hide background when hover | boolean | true | 2.23.0 |
status | The status of Link | 'error' | 'success' | 'warning' | - | - |
className | Additional css class | string | string[] | - | - |
icon | Custom Icon, Display the default icon when set to true . | ReactNode | boolean | - | - |
style | Additional style | CSSProperties | - | - |
Property | Description | Type | DefaultValue |
---|---|---|---|
href | The path or URL to navigate to. It can also be an object. | string | UrlObject | - |
as | Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our previous docs to see how it worked. Note: when this path differs from the one provided in href the previous href /as behavior is used as shown in the previous docs. | string | UrlObject | - |
replace | Replace the current history state instead of adding a new url into the stack. | boolean | false |
scroll | Whether to override the default scroll behavior | boolean | true |
shallow | Update the path of the current page without rerunning getStaticProps , getServerSideProps or getInitialProps . | boolean | false |
passHref | Forces Link to send the href property to its child. | boolean | false |
prefetch | The active locale is automatically prepended. locale allows for providing a different locale. When false href has to include the locale as the default behavior is disabled. | boolean | true |
locale | Enable legacy link behavior. | string | false | - |
legacyBehavior | Enable legacy link behavior. | boolean | false |
onMouseEnter | Optional event handler for when the mouse pointer is moved onto Link | React.MouseEventHandler | - |
onTouchStart | Optional event handler for when Link is touched | React.TouchEventHandler | - |
onClick | Optional event handler for when Link is clicked | React.MouseEventHandler | - |
FAQs
About In Next.js projects, the official recommendation is to use the Next.js Link component for navigation. However, integrating Arco Design's Link component within Next.js can be cumbersome. This component resolves this issue, offering full compatibility
We found that @kwooshung/nextjs-arcodesign-link demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.