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
import { Link } from '@sigx/daisyui';
Basic Usage
Loading preview...
Colors
Loading preview...
Hover Underline
With hover, the underline only appears when the pointer is over the link.
Loading preview...
Click Handler
onClick receives the native MouseEvent, so you can prevent the default
navigation and handle it yourself.
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | - | Anchor target |
color | 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' | - | Theme colour |
hover | boolean | false | Show the underline only on hover |
class | string | - | Additional CSS classes |
Slots
| Slot | Description |
|---|---|
default | Link content |
Events
| Event | Type | Description |
|---|---|---|
onClick | (e: MouseEvent) => void | Fired when the link is clicked |
