Links
The <d-link>
component is a wrapper over regular <a>
links or <router-link>
s and it is used behind the scenes across multiple components.
Note: Most components that use the
<d-link>
component are properly documented so you can see where you can take advantage of the props provided by this component.
Basic Example
Creating a regular link using the <d-link>
component is fairly simple.
<d-link href="#lorem-ipsum">My Link</d-link>
<!-- link-1.vue -->
Router Links
Using the to
prop will turn the link into a <router-link>
component.
Disabled State
Using the disabled
prop you can set your link as disabled.
Props
Prop | Description | Type | Default | Required |
---|---|---|---|---|
:href | The link href. | String | null | False |
:to | The router location. | String | Object | null | False |
:disabled | Whether the link is disabled, or not. | Boolean | false | False |
:target | The link target. | String | "_self" | False |
:rel | The link rel. | String | null | False |
:exact | Whether the route is exact, or not. | Undefined | False | |
:exact-active-class | The class name attached when the route is exact, | String | "active" | False |
:active | Whether the link is active, or not. | Boolean | false | False |
:active-class | The class applied when the link is active. | String | "active" | False |
:tag | The component tag. | String | "a" | False |