Migration to 4.0.0 Web ComponentsNew
This guide will help you understand how to transition an existing project from using an older version of Nord Web Components to using the latest 4.0.0 version.
What’s changing?
The latest version of Nord Design System now ships with two distinctive brands, therapy and veterinary. You can choose the currently active brand from the top left corner of this documentation website. Once chosen, you will get content that is tailored specifically for the brand and the business unit you’re working in.
We’re introducing these changes to unify the two design system platforms we have into one platform that can serve all of Nordhealth. This is necessary so that we can better support the next generation of apps and generative AI experiences at Nordhealth.
While this is a major change for our underlying architecture, we’ve kept it as backwards compatible as possible so that the upgrade path would stay straightforward. We’ll explain the required steps further down on this page.
Introducing this new layer of abstraction into Nord Design System’s theming architecture means that it now consists of the following four layers:
- Foundations: The foundations for building the next generation of apps and generative AI experiences at Nordhealth.
- Brands: Any business unit specific customizations.
- Interface Mode Themes: Light, dark, and high contrast themes.
- Accent Color: For when apps need easy user level theming.
- Interface Mode Themes: Light, dark, and high contrast themes.
- Brands: Any business unit specific customizations.
Updating package.json and dependencies
To migrate your application to use the latest Nord Design System packages, update package.json
with the necessary dependencies. You should:
- Update existing
@nordhealth/components
to version4.0.0
. - Update existing
@nordhealth/css
to version4.0.0
. - Update existing
@nordhealth/themes
to version9.0.0
. - If using Design Tokens directly, update
@nordhealth/tokens
to version8.0.0
. - If using our React wrappers (
@nordhealth/react
), consider switching to@nordhealth/components
instead as React 19 now supports Web Components and we’ve deprecated this package (more information). - If using our Web Component Vue Types (
@nordhealth/vue
), consider switching to@nordhealth/components/lib/vue.d.ts
instead as we’ve deprecated this package (more information).
Here’s an example package.json
:
{
"dependencies": {
"@nordhealth/components": "^4.0.0",
"@nordhealth/css": "^4.0.0",
"@nordhealth/themes": "^9.0.0"
}
}
Deprecating React wrappers
With the recent release of React 19 and the added support for Custom Elements, we’re deprecating the @nordhealth/react
package (which includes the Next.js integration) and will be removing it in the next major release.
For now, @nordhealth/react
will continue to receive updates as its build is fully automated, but you should start planning on utilizing the @nordhealth/components
package directly where possible.
To continue having full type checking and auto-completion in your JSX, you can use the new @nordhealth/components/lib/react.d.ts
type definition file.
Deprecating Vue package
We decided to make the Vue-specific types for our components part of the @nordhealth/components
package, instead of needing a separate @nordhealth/vue
package.
They can now be retrieved from the new @nordhealth/components/lib/vue.d.ts
type definition file instead of @nordhealth/vue
.
Because of this, we’re deprecating the @nordhealth/vue
package (which only contains the same types and no code) and will be removing it in the next major release.
For now, @nordhealth/vue
will continue to receive updates as its build is fully automated, but you should start planning on utilizing the new type definition file directly where possible.
Getting support
Have a question about migration to 4.0.0
? Please head over to the Support page for more guidelines and ways to contact us.
Migrating from Provet Cloud Design System
If you’re migrating from Provet Cloud Design System to Nord Design System, we’ve collected below an overview of changes to take into account. You can view more details about each specific change further down this page.
@provetcloud/web-components
- We are deprecating and ending support for the
@provetcloud/web-components
package. The package itself will continue to function, but when time permits, you should migrate to using the@nordhealth/components
package that now supports both therapy and veterinary brands. - All Web Components now use
<nord-
namespace. If your app is currently using for example<provet-button>
, they need to be renamed to<nord-button>
.
@provetcloud/web-components-vue-types
- We are deprecating and ending support for the
@provetcloud/web-components-vue-types
package. The package itself will continue to function, but when time permits, you should migrate to using the new@nordhealth/components/lib/vue.d.ts
type definition file that supports both therapy and veterinary brands.
@provetcloud/css
- We are deprecating and ending support for the
@provetcloud/css
package. The package itself will continue to function, but when time permits, you should migrate to using the@nordhealth/css
package that now supports both therapy and veterinary brands.
@provetcloud/tokens
- We are deprecating and ending support for the
@provetcloud/tokens
package. The package itself will continue to function, but when time permits, you should migrate to using the@nordhealth/tokens
package that now supports both therapy and veterinary brands. - While the CSS Custom Properties we ship continue to work independent of the brand that is chosen, we have introduced an appendix for the veterinary specific design tokens when you use them in e.g. Sass or JavaScript formats. To access for example the veterinary specific accent color, you’d use
$n-color-accent-vet
in Sass ortokens.nColorAccentVet
in JavaScript.
@provetcloud/themes
- We are deprecating and ending support for the
@provetcloud/themes
package. The package itself will continue to function, but when time permits, you should migrate to using the@nordhealth/themes
package that now supports both therapy and veterinary brands. - This package now includes four additional themes;
vet
,vet-dark
,vet-high-contrast
, andvet-dark-high-contrast
.
Updating references
If you’re migrating from Provet Cloud Design System, you should update the following references to the Provet Cloud packages in your project to point to the Nord packages instead. This includes updating the following:
- Update any references from
@provetcloud/web-components
to@nordhealth/components
. For example:import type { Layout } from '@provetcloud/web-components'
toimport type { Layout } from '@nordhealth/components'
. - Update any references from
@provetcloud/css
to@nordhealth/css
. - Update any references from
@provetcloud/themes
to@nordhealth/themes
. - Update any references from
@provetcloud/web-components-vue-types
to@nordhealth/components/lib/vue.d.ts
. For example:"types": ["@provetcloud/web-components-vue-types"]
to"types": ["@nordhealth/components/lib/vue.d.ts"]
. - Update any references from
@provetcloud/tokens
to@nordhealth/tokens
. - Update any CSS overrides from
provet-
tonord-
. - Update any Sass or JavaScript references to the Design Tokens to include the
vet
appendix. For example:$n-color-accent
to$n-color-accent-vet
in Sass, ortokens.nColorAccent
totokens.nColorAccentVet
in JavaScript. - Updat any references from
@import "@provetcloud/tokens/lib/tokens.scss";
to@import "@nordhealth/tokens/lib/color-vet.scss";
. - Update
provet
theme to the newvet
theme,provet-high-contrast
tovet-high-contrast
theme, etc. - Switch from
provet-
namespace tonord-
namespace instead (for example in Playwright tests,page.locator('nord-top-bar')
).
Renaming components
While Nord Design System ships with the same set of Web Components as Provet Cloud Design System, we use a different namespace for them. Instead of a <provet-button></provet-button>
we have a <nord-button></nord-button>
and so forth. You will need to use find and replace on your whole project to update the component names:
- Replace all instances of
<provet-
with<nord-
. - Replace all instances of
</provet-
with</nord-
.
Updating CDN URLs
If you’re migrating from Provet Cloud Design System and load any of the below listed packages via the Provet Cloud CDN, you’ll have to update the URLs to point to the Nord CDN instead:
For the latest available packages, please use the following URLs instead to migrate to the Nord CDN:
Design Tokens
<link rel="stylesheet" href="https://nordcdn.net/ds/tokens/8.0.0/tokens.custom-properties.css" integrity="sha384-e9mOMJSpfGwiX45hcBT+NmrETj3qMJev3mJgb93XR2ydEYLPnR5em5Kr0AUV5o3i" crossorigin="anonymous" />
Web Components
<script type="module" src="https://nordcdn.net/ds/components/4.0.0/index.js" integrity="sha384-DFUuRzqDzqMeUvawSFgRPMQV2+QcBsfUeBiy0GyDs48rV3hJGY+9dtM7W45xl5Qc" crossorigin="anonymous"></script>
CSS Framework
<link rel="stylesheet" href="https://nordcdn.net/ds/css/4.0.0/nord.min.css" integrity="sha384-9FV4ikmPiDEn1F2NuHi9J8BThbSFNWbgombQ9SNY9Jh0H/WWC40owQakNeJL7Jeg" crossorigin="anonymous" />
Themes
<!-- Light (default) theme -->
<link rel="stylesheet" href="https://nordcdn.net/ds/themes/9.0.0/vet.css" integrity="sha384-m91LHupcnWiGya8NVLut8CbIzk4BXmIyANudHXe2506i9wlTr4ccncegBmvsAThA" crossorigin="anonymous" />
<!-- Light high contrast theme -->
<link rel="stylesheet" href="https://nordcdn.net/ds/themes/9.0.0/vet-high-contrast.css" integrity="sha384-fbLjK//LfE5FFaBHp9DvaZCNWnVTuEA57zX/IolnOWbDZuSF9PtgDTMNqKsJtvp7" crossorigin="anonymous" />
<!-- Dark theme -->
<link rel="stylesheet" href="https://nordcdn.net/ds/themes/9.0.0/vet-dark.css" integrity="sha384-Iuru6O5PBD9zuQgQfPdDPG2xi/VOwtaFEoF8TQxXewAqJF70UeXPVaN/TjmRNABQ" crossorigin="anonymous" />
<!-- Dark high contrast theme -->
<link rel="stylesheet" href="https://nordcdn.net/ds/themes/9.0.0/vet-dark-high-contrast.css" integrity="sha384-QtM+aBxPxUr2tIzhJxYufPFblRmd//5ZhGVyY+PgezK9YQdjhYRg2ft7KR63x7Pc" crossorigin="anonymous" />
Updating themes
If you’re migrating from Provet Cloud Design System, switch to using the newly added veterinary themes in the updated @nordhealth/themes
package:
- Light (default):
@nordhealth/themes/lib/vet.css
- Light high contrast:
@nordhealth/themes/lib/vet-high-contrast.css
- Dark:
@nordhealth/themes/lib/vet-dark.css
- Dark high contrast:
@nordhealth/themes/lib/vet-dark-high-contrast.css
Updating Design Tokens
If you’re migrating from Provet Cloud Design System and using the Design Tokens in Sass or JavaScript, you will need to use the new brand specific vet
appendix.
When using Sass:
.example {
// To access veterinary brand colors, use -vet appendix
color: $n-color-accent-vet;
// To access therapy brand colors (default), no appendix is needed
color: $n-color-accent;
}
When using the Common.js module:
// To access veterinary brand colors, use Vet appendix
console.log(tokens.nColorAccentVet);
// To access therapy brand colors (default), no appendix is needed
console.log(tokens.nColorAccent);
Updating Localization Framework Integration
If you’re migrating from Provet Cloud Design System and using the Localization Framework Integration, you will need to update the integration by following the updated guidelines: