Markdown docs
Text
This is Twig implementation of the Link component.
Basic example usage:
<Link href="#">Link</Link>
Advanced example usage:
<Link
href="#"
color="primary"
isUnderlined
>
Primary Underlined Link
</Link>
Without lexer:
{% embed "@spirit/link.twig" with { props: {
color: 'primary',
href: '/'
}} %}
{% block content %}
Primary Link
{% endblock %}
{% endembed %}
API
Name | Type | Default | Required | Description |
---|---|---|---|---|
color | Action Link Color dictionary | primary | ✕ | Color variant |
href | string | — | ✔ | Link URL |
isDisabled | bool | false | ✕ | If true, Link is disabled |
isUnderlined | bool | false | ✕ | If true, Link is underlined |
target | string | null | ✕ | Browsing context for the link |
title | string | null | ✕ | Optional title to display on hover |
On top of the API options, the components accept additional attributes. If you need more control over the styling of a component, you can use style props and escape hatches.