Actions Core Stable

Link

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

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>

<Link />

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

Slots

SlotDescription
childrenThe link's text or content