Skip to content

Link

A native, styled link element.


---
import { Link } from 'fulldev-ui'
---
<Link href="#">Link</Link>

Props

size

Type: size?: 'sm' | 'md' | 'lg'

Sets the size for this component and all its children.

---
import { Link } from 'fulldev-ui'
---
<Link href="#" size="sm">Link</Link>
<Link href="#" size="md">Link</Link>
<Link href="#" size="lg">Link</Link>

density

Type: density?: 'base' | 'compact' | string

Changes the underlying values used by the size prop, for this component and all its children.

For example, we set compact on a card and can now size this and all children automatically based on the size on the wrapping block/section.

Choose a predefined density, or a custom value defined like explained in the theming guide.

---
import { Link } from 'fulldev-ui'
---
<Link href="#" density="compact" size="sm">Link</Link>
<Link href="#" density="compact" size="md">Link</Link>
<Link href="#" density="compact" size="lg">Link</Link>

variant

Type: variant?: 'muted'

Sets the color variant used for this component and all its children.

---
import { Link } from 'fulldev-ui'
---
<Link href="#">Link</Link>
<Link href="#" variant="muted">Link</Link>

theme

Type: theme?: 'light' | 'dark' | string

Changes the colors for this component and all its children.

Choose a predefined theme, or a custom value defined like explained in the theming guide.

text

Type: text?: string

Useful when getting content from Astro content collections or a headless CMS.

html

Type: html?: string

Similar to text prop, but renders HTML. Use this for for <span>, <br>, etc.

as & HTML Attributes

Type: as?: HTMLTag = 'a'

Used to determine which HTML tag is used to render the component.

Based on the value, all HTML attributes of this tag are accepted as props too.

For a detailed explanation see Polymorphic props in the Astro documentation.