# For passwoard Use API Key (Jfrog -> Edit Profile -> API Key)
# For email: use your official email id
# Copy the token from ./.npmrc file and store in the env file
You need to configure the VP_ARTIFACTORY_TOKEN environment variable in your system. To retrieve the value, please log in to jfrog and configure your npm client by login into it.
The html tag must have a lang attribute whose value is the language tag for that locale's language and region, using the language and region subtags. For instance, the language tag for Irish English would be en-IE, while the language tag for United States Spanish would be es-US.
Most pages will need only the the Graphik webfont. (If a page design specifies MarkWeb, consult your designer first before you add it. That font was used on the monolith for older VistaPrint site designs, and isn't part of our current branding.)
SWAN exports utility methods to retrieve the URLs for our hosted stylesheets, as shown below. Using these, you can add either hashed and versioned files.
If you are manually typing the URLs its advisable to use the versioned one.
Most of our components are CSS and HTML only, and don't need any additional JavaScript. The components below require JavaScript, and we provide a vanilla JS implementation:
There are separate instructions on how to use SWAN design tokens in your project's stylesheets.
If you’re using node-sass in your project, we recommend that you use sass instead of node-sass with SWAN. The sass project works with all the major bundlers and frameworks (eg. gatsby, webpack, snowpack, parcel, etc) without you needing to change anything in the configuration.
npm uninstall node-sass # if already installed npm i sass -D
Configuring the Body
SWAN is built to be interoperable with other design systems to allow incremental adoption. In order to achieve this, everything related to swan must be within the swan class.
Page Structure
Pages need a single, consistent set of HTML tags and CSS classes for wrapping major elements of the page, to provide a standard layout, and to support any behaviors we want to be consistent across the site. Your individual environment may already be providing some of these tags, e.g. through SwanProvider when using the visage library. If so, do not duplicate them.