LogoLogo
GitHub repository
GitHub repository
    Documentation
  • Overview
  • Getting Started
  • Guides


  • Hooks

  • Components


    • AsyncButton
    • AsyncIconButton
    • CodeBlock
    • CopyButton
    • Enumeration
    • ExampleCard
    • Icon
    • InlineCode
    • Logo
    • PageLoadingIndicator
    • PageOverview
    • Paragraph
    • QuoteBlock
    • SmartImage
    • SmartLink
    • StyleLink

SmartLink

A component for links that automatically detects whether the link is internal or external and adjusts the target and rel attributes accordingly, along with rendering a small indicator if external.
Should be used in most cases over HTML <a>, next/link, and Joy UI's Link component. (When using SmartLink is not an option, go for Joy UI's component over the other two.)

Props

The same as Joy UI's Link component, as well as:
  • hideExternalIndicator: Don't show the external indicator, even if the link is external.

Examples


1<Paragraph box>
2 <SmartLink href="#props">Props section</SmartLink><br />
3 <SmartLink href="/">Home</SmartLink><br />
4 <SmartLink href="https://www.example.com">example.com</SmartLink>
5</Paragraph>
1<Paragraph box>
2 <SmartLink href="#props">Props section</SmartLink><br />
3 <SmartLink href="/">Home</SmartLink><br />
4 <SmartLink href="https://www.example.com">example.com</SmartLink>
5</Paragraph>

See also


LogoLogo