Polaris
The global header and footer navigation for all things Xfinity.
To read more of our documentation, click here.
Installation
Polaris is a small collection of
Custom Elements that can be easily included and used in an html file.
To load the global nav version of Polaris, add the following in the
<head> of your document. For staging environments, use
https://polaris.staging.xfinity.com/.
1 |
<script> |
To load the NOW version of Polaris, add the following in the
<head> of your document. For staging environments, use
https://polaris.staging.xfinity.com/.
1 |
<script> |
NOTE: We use client side detection to determine if your browser supports custom elements to return a polyfill for older browsers or not. Also, polaris is loaded async, so you don’t have to worry about it blocking rendering on your site. The style tag adds a default size to header to avoid FOUC.
Quick Start
If you followed the
Installation guide above, you now have access to two new tags,
<xc-header> and
<xc-footer>. They can be added to the top and bottom of the
<body> tag, respectively.
1 |
<xc-header client-id="YOUR-CLIENT-ID"></xc-header> |
The
client-id attribute is used by Polaris to identify your application. There is no registration required,
simply choose a value and add to
xc-header and
xc-footer (must be consistent).
Polaris has extensive configuration capabilities. Please reach out to the Polaris team for additional information.