Vue
Install CLI
Install the Elements CLI to your system. This will add the nve command to your path and provide several helpful commands for working with Elements.
curl -fsSL https://nvidia.github.io/elements/install.sh | bash
curl -fsSL https://nvidia.github.io/elements/install.cmd -o install.cmd && install.cmd && del install.cmd
# install the CLI
npm install -g @nvidia-elements/cli
Create a New Project
Use the Elements CLI to quickly bootstrap a new vue project with the necessary dependencies:
nve project.create --type=vue
Setup an Existing Project
Setup an existing project to use Elements you can use the setup command to add the necessary dependencies and configure the MCP server.
nve project.setup
If not yet done, install NodeJS. NodeJS is a JavaScript runtime that has a large ecosystem of tooling and packages for Web Development. Once installed the Node Package Manager (NPM) will be available for use.
Manual Integration
If installing to an existing project, install the core dependencies:
# install core dependencies
npm install @nvidia-elements/themes @nvidia-elements/styles @nvidia-elements/core
Once installed import and use Elements within Vue SFC files.
import '@nvidia-elements/core/alert/define.js';
Properties and events then work via the standard Vue template syntax.
TypeScript types
To get type checking and autocomplete for Elements in Vue templates (and to have invalid props like size="invalid" reported by the IDE and build), add a reference to the custom-elements Vue types.
Create or update env.d.ts in your project root:
/// <reference types="vite/client" />
/// <reference path="./node_modules/@nvidia-elements/core/dist/custom-elements-vue.d.ts" />
Ensure your app tsconfig includes this file (for example, tsconfig.app.json with "include": ["env.d.ts", "src/**/*", "src/**/*.vue"]). The path reference loads the types that augment Vue’s GlobalComponents, so tags such as <nve-page-panel size="sm"> have type checking and the IDE reports invalid values.
If your build does not already run the type checker, run vue-tsc before the build (for example: vue-tsc --noEmit && vite build) so type errors fail the build.
// - status - HTML attribute
// - :closable - can update via attributes or JavaScript property binding
// - @close - event listener binding for 'close' custom event
<nve-alert-group status="success">
<nve-alert :closable="true" @close="closeAlert">hello there!</nve-alert>
</nve-alert-group>