Tailwind removes the styling on standard links so we provide an easy way to re-add them. This works very similarly to the link_to helper in Rails.

Basic links are styled with the .link class. The title and href options can be passed as keyword arguments, or as the first two positional arguments.

The title can also be passed as a block.

Preview
Code
.flex.items-end.space-x-4
  = daisy_link title: "Home", href: "#"
  = daisy_link "Docs", "#", css: "link-primary text-xl"
  = daisy_link "Components", "#", css: "link-secondary text-2xl"
  = daisy_link "#", css: "link-success link-hover text-3xl" do
    Big Hover Link

Links support icon, left_icon, and right_icon options just like buttons. You can use these to add icons to the left and/or right of the link text.

Preview
Code
.flex.items-end.space-x-4
  = daisy_link title: "Home", href: "#", icon: "home"
  = daisy_link title: "Settings", href: "#", icon: "cog-6-tooth", css: "link-primary"
  = daisy_link title: "Navigate", href: "#", left_icon: "arrow-left", right_icon: "arrow-right", css: "link-secondary"
Made with by Profoundry .
Copyright © 2023-2026 Profoundry LLC.
All rights reserved.