Note: This documentation is for the old 0.8.0 version of A-Frame. Check out the documentation for the current 1.5.0 version
The link component connects between experiences and allows for traversing between VR web pages. When activated via an event, the link component sends the user to a different page, just like a normal web page redirect. To maintain VR across pages, the following conditions must apply:
- The browser is up-to-date with the WebVR specification and implements the
- The destination web page listens to the window [
vrdisplayactivate] event and enters VR.
A link in VR can be anything such as grabbing onto an object, placing something on our head, clicking something, even eating something! We provide a default implementation of links as a portal or window, using a 360° image thumbnail to preview the destination.
The UX of link traversal will continue to refine as we iterate and experiment, both in content and from the browser.
The default UX of the link component as a portal can be interacted with using a cursor or controllers. This is not provided directly in the A-Frame core, but there is a link-controls component in the A-Frame examples. This component shows tooltips and provides button mappings for peeking and entering portals.
We also provide a link primitive with a different syntax:
<a-link href="index.html" title="My Homepage" image="#homeThumbnail"></a-link>
|Inner (background) color of the portal.
|Border color of the portal.
|Boolean to toggle link highlight color.
|Border color when highlighted.
|Destination URL where the link points to.
|360° image used as scene preview in the portal. Can be a selector to an
<img> element or a URL.
|Event to listen to that triggers link traversal.
|Whether the 360° image is fully expanded for preview.
|Text displayed on the link. The
href or page URL is used if not defined.
|Color of the text displayed on the link.
|Whether to enable the default visual appearance of a portal. Set to false if we want to implement our own pattern or form of link traversal.
Sends the user to the page specified by the