Link

A styled anchor component for navigation with variant and colour options.

Anatomy

<script>
  import { Link } from "@saas-ui/svelte/components/link";
</script>

<Link href="/about" variant="underline" colour="blue">
  Learn more
</Link>

Examples

Basic Accessibility

Basic Link component for navigation.

Colours Accessibility

Use the colour prop to change the colour of the Link.

External Accessibility

Add an external link icon to the Link component.

Variants Accessibility

Use the variant prop to change the appearance of the Link component.

Within Text Accessibility

Use Link within text to create a hyperlink.

Props

Prop Type Default Description
variant underline | plain plain The visual style of the component.
colour gray | red | orange | yellow | green | teal | blue | cyan | purple | pink | rose gray The colour theme of the component.
href text - -
children any - The content to be rendered inside the component.
class text - Additional CSS classes to apply.