mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
docs(link): add target=_blank example
This commit is contained in:
parent
f86bd0710d
commit
4b783e7133
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,16 @@
|
|||
|
||||
<Link href="https://www.carbondesignsystem.com/">Carbon Design System</Link>
|
||||
|
||||
### Target _blank
|
||||
|
||||
Setting `target` to `"_blank"` opens the link in a new tab.
|
||||
|
||||
If `target="_blank"`, the `Link` component will automatically set `rel="noopener noreferrer"` to guard against [potential cross-origin security exploits](https://web.dev/external-anchors-use-rel-noopener/).
|
||||
|
||||
You can override the `rel` attribute with a custom value.
|
||||
|
||||
<Link href="https://www.carbondesignsystem.com/" target="_blank">Carbon Design System</Link>
|
||||
|
||||
### Inline variant
|
||||
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue