Link#

Link renders an <a> with DaisyUI's link styling: underlined by default, tinted with any theme colour, and optionally underlined only on hover.

Import#

TSX
import { Link } from '@sigx/daisyui';

Basic Usage#

TSX
Loading preview...

Colors#

TSX
Loading preview...

Hover Underline#

With hover, the underline only appears when the pointer is over the link.

TSX
Loading preview...

Click Handler#

onClick receives the native MouseEvent, so you can prevent the default navigation and handle it yourself.

TSX
Loading preview...

Props#

PropTypeDefaultDescription
hrefstring-Anchor target
color'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error'-Theme colour
hoverbooleanfalseShow the underline only on hover
classstring-Additional CSS classes

Slots#

SlotDescription
defaultLink content

Events#

EventTypeDescription
onClick(e: MouseEvent) => voidFired when the link is clicked