From 7e108aceadaf455f78258cfbf957fbb8941cecdc Mon Sep 17 00:00:00 2001
From: Eric Y Liu let
| Yes | null | HTMLAnchorElement | HTMLParagraphElement
| null
| Obtain a reference to the top-level HTML element |
-| size | let
| No | "sm" | "lg"
| -- | Specify the size of the link |
-| href | let
| No | string
| -- | Specify the href value |
-| inline | let
| No | boolean
| false
| Set to `true` to use the inline variant |
-| disabled | let
| No | boolean
| false
| Set to `true` to disable the checkbox |
-| visited | let
| No | boolean
| false
| Set to `true` to allow visited styles |
+| Prop name | Kind | Reactive | Type | Default value | Description |
+| :-------- | :--------------- | :------- | :--------------------------------------------------------------------- | ------------------ | ----------------------------------------------------------------------------------- |
+| ref | let
| Yes | null | HTMLAnchorElement | HTMLParagraphElement
| null
| Obtain a reference to the top-level HTML element |
+| size | let
| No | "sm" | "lg"
| -- | Specify the size of the link |
+| href | let
| No | string
| -- | Specify the href value |
+| inline | let
| No | boolean
| false
| Set to `true` to use the inline variant |
+| icon | let
| No | typeof import("carbon-icons-svelte").CarbonIcon
| -- | Specify the icon from `carbon-icons-svelte` to render
`inline` must be `false` |
+| disabled | let
| No | boolean
| false
| Set to `true` to disable the checkbox |
+| visited | let
| No | boolean
| false
| Set to `true` to allow visited styles |
### Slots
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index 1d1410f9..3253c26b 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -4614,6 +4614,15 @@
"constant": false,
"reactive": false
},
+ {
+ "name": "icon",
+ "kind": "let",
+ "description": "Specify the icon from `carbon-icons-svelte` to render\n`inline` must be `false`",
+ "type": "typeof import(\"carbon-icons-svelte\").CarbonIcon",
+ "isFunction": false,
+ "constant": false,
+ "reactive": false
+ },
{
"name": "disabled",
"kind": "let",
diff --git a/docs/src/pages/components/Link.svx b/docs/src/pages/components/Link.svx
index 115ec048..52bc215f 100644
--- a/docs/src/pages/components/Link.svx
+++ b/docs/src/pages/components/Link.svx
@@ -4,6 +4,7 @@ components: ["Link", "OutboundLink"]
@@ -32,6 +33,15 @@ An alternative to manually setting `target` to `"_blank"` is to use the `Outboun
Carbon Design System.
+### Link with icon
+
+Note that `inline` must be `false` when rendering a link with an icon.
+
+