Skip to content
Actions Core Stable

Link

.md

Inline text link with a muted variant, configurable underline, and a safe external-link mode with a new-tab arrow

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { Link } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
	import { Link } from "fancy-ui-svelte";
</script>

<p class="text-foreground max-w-md text-sm leading-relaxed">
	fancy-ui ships as an npm package, but every component is also
	<Link sound href="/docs/components/link">copy-pasteable</Link>
	straight from the docs — see the
	<Link sound href="/docs" external>full component index</Link>
	for what else is in the box.
</p>

Examples

Basic Usage

Variants

Default vs. muted color treatment.

Off-site link with the arrow glyph, new tab, and safe rel.

Underline Modes

hover, always, and none underline behavior.

Props

PropTypeDefaultDescription
href *string-Destination URL
variant "default" | "muted""default"default reads as inline copy; muted recedes into supporting text at a smaller size
external booleanfalseAppends an arrow glyph, defaults target to _blank, and guarantees a safe rel
underline "hover" | "always" | "none""hover"When the underline shows
target string-Anchor target; external fills this in as _blank when left unset
rel string-Anchor rel; merged with noopener noreferrer whenever the link opens a new tab
onclick (event: MouseEvent) => void-Native click handler
class string-Additional CSS classes
ref HTMLAnchorElement | nullnullBindable element reference
sound booleanfalsePlays the press cue on activation, once the user has enabled sound

Slots

SlotDescription
children The link's text or content