Link

Tailwind's CSS reset removes styles from links. Link makes them pretty again.

Code Example
<Link>I'm a simple link</Link>

Components

Link is a standalone component.

Link can be customized with the following props:

PropTypeDescription
is
string
Sets the HTML tag.
hover
boolean
Only show underline on hover.
color
string
Sets the color to one of the below prop names.
   
neutral
boolean
Sets the color to neutral.
   
primary
boolean
Sets the color to primary.
   
secondary
boolean
Sets the color to secondary.
   
accent
boolean
Sets the color to accent.
   
info
boolean
Sets the color to info.
   
success
boolean
Sets the color to success.
   
warning
boolean
Sets the color to warning.
   
error
boolean
Sets the color to error.

Usage

If you try to use <Link> and haven't configured a component prefix (like <DaisyLink>), Vue will need some help knowing which element you need. Since link (lowercase) is an HTML element, you'll need to manually import link into your Vue file:

<script setup lang="ts">
import { Link } from 'daisy-ui-kit'
</script>

<template>
  <Link href="/">Home</Link>
</template>

Color

There are two ways of specifying Button color:

  • The neutral, primary, secondary, accent, success, info, warning, and error boolean props.
  • The color prop, which accepts a string with any of the above prop names.
Code Example
<Link primary>I'm a simple link</Link>

Hover

Use the hover prop to only underline while hovered.

Code Example
<Link hover>I'm a simple link</Link>