diff --git a/lib/buttons-and-links/KExternalLink.vue b/lib/buttons-and-links/KExternalLink.vue index 2ac368506..b5e5d0cc1 100644 --- a/lib/buttons-and-links/KExternalLink.vue +++ b/lib/buttons-and-links/KExternalLink.vue @@ -5,6 +5,8 @@ :class="buttonClasses" :href="href" :download="download" + :openInNewTab="openInNewTab" + :target="openInNewTab ? '_blank' : false" dir="auto" @mouseenter="hovering = true" @mouseleave="hovering = false" @@ -70,6 +72,13 @@ type: String, required: false, }, + /** + * If provided, opens link in new tab + */ + openInNewTab: { + type: Boolean, + default: false, + }, }, data() { return {