webflow svelte components logoWFS

Link

Interactive text element that works inside paragraphs or on its own.

Usage

<script lang="ts">
  import { Link } from '$lib/components/link';
</script>
<Link href="https://webflow.com">Link text</Link>

Properties

The Link component extends the Bits UI <Button> component. Find the full list of available properties in the official Bits UI documentation.

PropTypeDefault
variant
string
primary
leadingIcon
ComponentType
-
trailingIcon
ComponentType
-
underline
boolean
false

Examples

Icon support

Use the leadingIcon and trailingIcon properties to add an icon to the link.

Variants

Use the variant property to change the appearance of the link.

Underline

Use the underline property to show an underline on the link.

Button

When a Link component is used without an href property, it will automatically behave like a button.

Disabled

Use the disabled property to disable the link (button) when it doesn't have an href.

On this page