The External Link component provides a warning to users before automatically opening a new window or tab.
Opening new windows automatically when a link is activated can be disorienting for people who have difficulty perceiving visual content, and for some people with cognitive disabilities, if they are not warned in advance.
Providing a warning allows the user to decide it they want to leave the current window, and the warning will help them find their way back, if they do decide they would like to go to the new window. It will help them understand that the "back" button will not work and that they have to return to the last window they had open, in order to find their previous location.
1<ExternalLink href="https://www.google.com.au">this is an external link</ExternalLink>
The text should be inherited by surrounding content, as such the size props only controls the icon size.
this is an external link opens in new window
this is an external link opens in new window
this is an external link opens in new window
this is an external link opens in new window
1<ExternalLink href="https://www.google.com.au" size="small">this is an external link</ExternalLink>2<ExternalLink href="https://www.google.com.au">this is an external link</ExternalLink>3<ExternalLink href="https://www.google.com.au" size="large">this is an external link</ExternalLink>4<ExternalLink href="https://www.google.com.au" size="xlarge">this is an external link</ExternalLink>
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| children | ReactNode | true | The link text to display. | |
| href | string | true | The url path of the link. | |
| size | oneOf: default | small | large | xlarge | default | false | Sets the size of the external icon. If not set "default" is output as the default setting. |
| className | string | false | Allows for specific classNames to be set. |
Import by:
1import { ExternalLink } from "@parsley_design_systems/design-system"