pos-rich-link
Overview
Renders a link to a resource. The resource is either identified by the given uri property, by the resource in
context (given by a surrounding pos-resource element), or by following a relation from or to the resource in
context (rel / rev attributes).
By default, it renders a label and description of the resource. You can override this by providing custom content as child elements.
Important: This component will fire a pod-os:link event when clicked instead of doing a normal browser navigation.
To actually navigate to the link target, you have to listen to the event and then perform the navigation
programmatically. Other link-related behaviours (like open in a new tab and copy link target) are working normally.
This is to support client-side navigation.
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
rel |
rel |
Link will be obtained by following the predicate with this URI forward from a resource | string |
undefined |
rev |
rev |
Link will be obtained by following the predicate with this URI in reverse from a resource | string |
undefined |
uri |
uri |
Link will use this URI | string |
undefined |
Events
| Event | Description | Type |
|---|---|---|
pod-os:error |
CustomEvent<any> |
|
pod-os:link |
CustomEvent<any> |
|
pod-os:resource |
CustomEvent<any> |
Dependencies
Used by
- pos-attachments
- pos-example-resources
- pos-navigation
- pos-relations
- pos-reverse-relations
- pos-subjects
- pos-type-index-entries
Depends on
Graph
graph TD;
pos-rich-link --> pos-label
pos-rich-link --> pos-description
pos-rich-link --> pos-resource
pos-attachments --> pos-rich-link
pos-example-resources --> pos-rich-link
pos-navigation --> pos-rich-link
pos-relations --> pos-rich-link
pos-reverse-relations --> pos-rich-link
pos-subjects --> pos-rich-link
pos-type-index-entries --> pos-rich-link
style pos-rich-link fill:#f9f,stroke:#333,stroke-width:4px
Built with StencilJS