mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
33 lines
No EOL
998 B
Text
33 lines
No EOL
998 B
Text
<script>
|
|
import { Link } from "carbon-components-svelte";
|
|
import Preview from "../../components/Preview.svelte";
|
|
</script>
|
|
|
|
### Default
|
|
|
|
<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>
|
|
Visit the
|
|
<Link inline href="https://www.carbondesignsystem.com/">Carbon Design System</Link>.
|
|
</div>
|
|
|
|
### Disabled
|
|
|
|
<Link disabled href="https://www.carbondesignsystem.com/">Carbon Design System</Link>
|
|
|
|
### Visited styles
|
|
|
|
<Link visited href="https://www.carbondesignsystem.com/">Carbon Design System</Link> |