Usage
Default
Use the default slot to set the text of the component.
vue
Colors
Use the color
prop to customize the component's color.
vue
Underline
Use the underline
prop to control whether the link has an underline.
vue
<script setup lang="ts">
import { CLLink, CLColors } from '@codeandfunction/callaloo'
</script>
<template>
<CLLink :color="CLColors.Primary" href="#" :underline="true">With Underline</CLLink>
<CLLink :color="CLColors.Primary" href="#" :underline="false">Without Underline</CLLink>
</template>
External Links
Use the external
prop to indicate that the link opens in a new tab/window. This automatically adds an external link icon.
vue
<script setup lang="ts">
import { CLLink, CLColors, CLLinkTarget } from '@codeandfunction/callaloo'
</script>
<template>
<CLLink :color="CLColors.Primary" href="https://example.com" :external="true" :target="CLLinkTarget.Blank">External Link</CLLink>
<CLLink :color="CLColors.Primary" href="#" :underline="false" :on-click="(evt) => evt?.preventDefault()">Internal Link</CLLink>
</template>