# Elements
> The design language for AI/ML factories. A framework-agnostic web-component library, theme system, and toolkit from NVIDIA for building exceptional AI/ML user experiences.
Elements ships Web Components/HTML custom elements (`nve-*`), design tokens, CSS utilities, server-side rendering support, and starter templates for TypeScript, React, Vue, Angular, Svelte, Lit, SolidJS, Preact, Next.js, Nuxt, Hugo, and Go. Accessibility (WCAG), theming, and internationalization are first-class. Components follow the ARIA Authoring Practices Guide and are distributed as framework-agnostic custom elements.
- [CLI/MCP](https://nvidia.github.io/elements/context/cli.md): Command-line and MCP server. Recommended starting point for agents and developers.
- [ESLint](https://nvidia.github.io/elements/context/lint.md): ESLint rules for Elements projects. Validate HTML and CSS for API best practices.
- [APIs List](https://nvidia.github.io/elements/context/api/index.md): List of all available Elements (nve-*) APIs and components.
- [Examples List](https://nvidia.github.io/elements/context/examples/index.md): List of all available UI patterns and example templates.
- [Skills List](https://nvidia.github.io/elements/context/skills/index.md): List of all available agent skills and context fragments.
- [Icons List](https://nvidia.github.io/elements/context/api/icons/index.md): List of all available icon names for nve-icon and nve-icon-button.
- [Tokens List](https://nvidia.github.io/elements/context/api/tokens/index.md): List of all available semantic CSS custom properties / design tokens for theming.
For the complete documentation archive in a large single file, use [llms-full.txt](https://nvidia.github.io/elements/llms-full.txt). Intended for offline use or content vectorization.
# @nvidia-elements/cli
The **@nvidia-elements/cli** is a dual-mode command-line tool for the Elements Design System that provides both interactive CLI commands and a Model Context Protocol (MCP) server for AI assistant integration.
## Purpose
This package serves two primary modes:
1. **Interactive CLI (`nve` command)** - Command-line interface with interactive prompts for:
- Component API discovery and search
- Example template browsing and searching
- Playground creation and validation
- Project scaffolding and health checks
- Changelog and version information
- Design token access
2. **MCP Server (`nve mcp` command)** - Model Context Protocol server that:
- Exposes all CLI tools to AI assistants (Claude, Cursor, etc.)
- Provides context-specific prompts for common tasks
- Enables AI-assisted development with Elements components
- Integrates Elements knowledge directly into AI workflows
## Getting Started
To use the Elements CLI you must have [NodeJS](https://nodejs.org/) installed.
```shell
npm install -g @nvidia-elements/cli
nve
```
## Usage
| Command | Description |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `nve api.list [format]` | Get list of all available Elements (nve-*) APIs and components. |
| `nve api.search [query] [format]` | Search and retrieve a list of Elements (nve-*) components and APIs using keywords. |
| `nve api.get [names] [format]` | Get documentation known components or attributes by name (nve-*). |
| `nve api.template.validate [template]` | Validates HTML templates using Elements APIs and components (nve-*). |
| `nve api.imports.get [template]` | Get esm imports for a given HTML template using Elements APIs (nve-*). |
| `nve api.tokens.list [format]` | Get available semantic CSS custom properties / design tokens for theming. |
| `nve packages.list` | Get latest published versions of all Elements packages. |
| `nve packages.get [name]` | Get details for a specific Elements package. |
| `nve packages.changelogs.get [name] [format]` | Retrieve changelog details by package name. |
| `nve examples.list [format]` | Get list of available Elements (nve-*) patterns and examples. |
| `nve playground.validate [template]` | Validates HTML templates specifically for playground examples. |
| `nve playground.create [template] [type] [name] [author]` | Create a shareable playground URL from an HTML template. |
| `nve project.create [type] [cwd] [start]` | Create a new starter project. |
| `nve project.validate [type] [cwd]` | Check project for configuration issues and dependencies. |
| `nve project.setup [cwd]` | Setup or update a project to use Elements. |
## MCP
### Quick Setup
The fastest way to configure MCP is with the `setup` command:
```shell
nve project.setup
```
This detects your package manager, configures the MCP server for both Cursor, Codex, and Claude Code, and adds Elements core dependencies to the project.
### Claude Code
Install to Claude Code by adding the configuration to your `.mcp.json` file. Add the following configuration to your `.mcp.json` file (typically located at `~/.config/claude-code/.mcp.json` or `%APPDATA%\claude-code\.mcp.json` on Windows):
```json
{
"mcpServers": {
"elements": {
"description": "NVIDIA Elements UI Design System (nve-*), custom element schemas, APIs and examples",
"command": "nve",
"args": ["mcp"]
}
}
}
```
After adding the configuration, restart Claude Code for the changes to take effect. The Elements MCP tools are then available for use in your conversations.
### Cursor
Install to Cursor with the MCP configuration below.
```json
// .cursor/mcp.json
{
"mcpServers": {
"elements": {
"description": "NVIDIA Elements UI Design System (nve-*), custom element schemas, APIs and examples",
"command": "nve",
"args": ["mcp"]
}
}
}
```
### Prompts
| Prompt | Description | Example Prompt |
| ------ | ----------- | -------------- |
| `/about` | A brief introduction to Elements | `/about` |
| `/doctor` | Verify Elements setup and MCP configuration | `/doctor` |
| `/playground` | Context for creating playground prototypes | `/playground` Create an example login form |
| `/search` | Context for searching Elements APIs | `/search` What works for notifying a user of a long running process? |
| `/new-project` | Context for creating a new Elements project. | `/new-project` Create an Angular todo app |
| `/migrate` | Context for migrating from deprecated Elements APIs | `/migrate` Migrate this project from deprecated Elements APIs |
### Skills
Skills provide persistent context to AI agents for building UI with Elements.
| Skill | Description |
| ----- | ----------- |
| `elements` | Build UI with NVIDIA Elements (NVE). Provides authoring guidelines, workflow steps, and API best practices for creating, editing, or reviewing HTML templates that use nve-* components. |
| `authoring` | Authoring workflow guidance for creating, editing, or reviewing HTML templates that use nve-* components. |
| `migration` | Migration guidance for moving projects from deprecated Elements APIs to current packages and tools. |
### Tools
| Tool | Description |
| ---- | ----------- |
| `api_list` | Get list of all available Elements (nve-*) APIs and components. |
| `api_get` | Get documentation known components or attributes by name (nve-*). |
| `api_template_validate` | Validates HTML templates using Elements APIs and components (nve-*). |
| `api_imports_get` | Get esm imports for a given HTML template using Elements APIs (nve-*). |
| `api_tokens_list` | Get available semantic CSS custom properties / design tokens for theming. |
| `packages_list` | Get latest published versions of all Elements packages. |
| `packages_get` | Get details for a specific Elements package. |
| `packages_changelogs_get` | Retrieve changelog details by package name. |
| `examples_list` | Get list of available Elements (nve-*) patterns and examples. |
| `examples_get` | Get the full template of a known example or pattern by id. |
| `skills_list` | Get a list of available Elements agent skills and context fragments. |
| `skills_get` | Get a bundled Elements agent skill or context fragment by name. |
| `playground_validate` | Validates HTML templates specifically for playground examples. |
| `playground_create` | Create a shareable playground URL from an HTML template. |
| `project_create` | Create a new starter project. |
| `project_validate` | Check project for configuration issues and dependencies. |
| `project_setup` | Setup or update a project to use Elements. |
## Links
- [Documentation](https://NVIDIA.github.io/elements/docs/cli/)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
- [GitHub Repo](https://github.com/NVIDIA/elements)
- [npm](https://www.npmjs.com/package/@nvidia-elements/cli)
# @nvidia-elements/lint
The `@nvidia-elements/lint` package is a utility library that provides Elements-specific lint rules to enforce best practices and prevent common errors when using Elements.
## Getting Started
```shell
npm install @nvidia-elements/lint
```
## Usage
To apply the default recommended configs import `elementsRecommended`.
```javascript
// eslint.config.js
import { elementsRecommended } from '@nvidia-elements/lint/eslint';
/** @type {import('eslint').Linter.Config[]} */
export default [
...elementsRecommended
];
```
Or optionally import language specific configurations.
```javascript
// eslint.config.js
import { elementsHtmlConfig, elementsCssConfig } from '@nvidia-elements/lint/eslint';
/** @type {import('eslint').Linter.Config[]} */
export default [
elementsHtmlConfig,
elementsCssConfig
];
```
```shell
eslint -c ./eslint.config.js --color
```
## Severity
You can individually adjust rules for lint severity. By default rules use `error` severity.
```javascript
import { elementsHtmlConfig, elementsCssConfig } from '@nvidia-elements/lint/eslint';
/** @type {import('eslint').Linter.Config[]} */
export default [
elementsHtmlConfig,
{
...elementsCssConfig,
rules: {
'@nvidia-elements/lint/no-unexpected-css-value': 'warn'
}
}
];
```
### Rules
| Rule | Description | Language | Severity |
| ---- | ----------- | -------- | -------- |
| `@nvidia-elements/lint/no-complex-popovers` | Disallow excessive DOM complexity inside popover elements. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-attributes` | Disallow use of deprecated attributes in HTML. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-global-attribute-value` | Disallow use of deprecated attribute values for nve-* utility attributes. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-css-imports` | Disallow use of deprecated CSS import paths. | CSS | `error` |
| `@nvidia-elements/lint/no-deprecated-css-variable` | Disallow use of deprecated --mlv-* CSS theme variables. | CSS | `error` |
| `@nvidia-elements/lint/no-deprecated-global-attributes` | Disallow use of deprecated global utility attributes in HTML. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-icon-names` | Disallow use of deprecated icon names. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-packages` | Disallow usage of deprecated packages. | JSON | `error` |
| `@nvidia-elements/lint/no-deprecated-popover-attributes` | Disallow use of deprecated popover attributes. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-slots` | Disallow use of deprecated slot APIs. | HTML | `error` |
| `@nvidia-elements/lint/no-deprecated-tags` | Disallow use of deprecated elements in HTML. | HTML | `error` |
| `@nvidia-elements/lint/no-invalid-event-listeners` | Disallow inline event handler attributes in HTML. | HTML | `error` |
| `@nvidia-elements/lint/no-invalid-invoker-triggers` | Disallow use of invoker trigger attributes on non-button nve-* elements. | HTML | `error` |
| `@nvidia-elements/lint/no-missing-control-label` | Require form controls to have an accessible label. | HTML | `error` |
| `@nvidia-elements/lint/no-missing-gap-space` | Require gap spacing on row and column layouts. | HTML | `off` |
| `@nvidia-elements/lint/no-missing-icon-name` | Require icon elements to have an icon name attribute. | HTML | `error` |
| `@nvidia-elements/lint/no-missing-popover-trigger` | Require popover elements to have a corresponding trigger element. | HTML | `error` |
| `@nvidia-elements/lint/no-missing-slotted-elements` | Disallow use of missing slotted elements. | HTML | `error` |
| `@nvidia-elements/lint/no-nested-container-types` | Require nested container components to use flat container mode. | HTML | `error` |
| `@nvidia-elements/lint/no-restricted-attributes` | Disallow use of invalid API attributes or utility attributes on custom HTML element tags. | HTML | `error` |
| `@nvidia-elements/lint/no-restricted-page-sizing` | Disallow custom height or width styles on nve-page. | HTML | `error` |
| `@nvidia-elements/lint/no-slotted-popovers` | Disallow the slot attribute on popover elements. | HTML | `error` |
| `@nvidia-elements/lint/no-tailwind-classes` | Disallow Tailwind CSS utility classes with Elements alternatives, and all Tailwind utilities on nve custom elements. | HTML | `warn` |
| `@nvidia-elements/lint/no-unexpected-attribute-value` | Disallow use of invalid attribute values for nve-* elements. | HTML | `error` |
| `@nvidia-elements/lint/no-unexpected-css-value` | Disallow use of invalid CSS values. | CSS | `error` |
| `@nvidia-elements/lint/no-unexpected-css-variable` | Disallow use of invalid CSS theme variables. | CSS | `error` |
| `@nvidia-elements/lint/no-unexpected-global-attribute-value` | Disallow use of invalid attribute values in HTML. | HTML | `error` |
| `@nvidia-elements/lint/no-unexpected-input-type` | Disallow slotted input elements with a type that does not match the parent Elements component. | HTML | `error` |
| `@nvidia-elements/lint/no-unexpected-library-dependencies` | Disallow incorrect dependency usage of @nvidia-elements packages in consuming libraries. | JSON | `error` |
| `@nvidia-elements/lint/no-unexpected-slot-value` | Disallow use of invalid slot values in HTML. | HTML | `error` |
| `@nvidia-elements/lint/no-unexpected-style-customization` | Disallow use of style customization in Elements playground template. | HTML | `off` |
| `@nvidia-elements/lint/no-unknown-css-variable` | Disallow use of unknown --nve-* CSS theme variables. | CSS | `error` |
| `@nvidia-elements/lint/no-unknown-tags` | Disallow use of unknown nve-* tags. | HTML | `error` |
| `@nvidia-elements/lint/no-unstyled-typography` | Require typography elements to have nve-text styling applied. | HTML | `error` |
## Links
- [Documentation](https://NVIDIA.github.io/elements/docs/lint/)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
- [GitHub Repo](https://github.com/NVIDIA/elements)
- [npm](https://www.npmjs.com/package/@nvidia-elements/lint)
# Skills
List of all available skills and context fragments.
- [about](https://nvidia.github.io/elements/context/skills/about.md): Instructions for providing a brief introduction for using the Elements Design System
- [authoring](https://nvidia.github.io/elements/context/skills/authoring.md): Best practices and workflow guidance for authoring UI with NVIDIA Elements.
- [doctor](https://nvidia.github.io/elements/context/skills/doctor.md): Instructions for ensuring the Elements Design System is setup correctly
- [integration](https://nvidia.github.io/elements/context/skills/integration.md): Best practices and workflow guidance for creating or setting up Elements projects.
- [migration](https://nvidia.github.io/elements/context/skills/migration.md): Instructions for migrating a project from deprecated Elements APIs using lint tooling and CLI health checks
- [search](https://nvidia.github.io/elements/context/skills/search.md): Best practices for providing Elements API Documentation
- [elements](https://nvidia.github.io/elements/context/skills/elements.md): Build UI with NVIDIA Elements (NVE). Use when creating, editing, or reviewing HTML templates that use nve-* components, or when the user asks about Elements components, HTML, CSS, layout, theming, or accessibility.
## Elements Design System
Give a high level overview of the Elements Design System.
**Structure the content as:**
1. **What is Elements?** - Explain it's NVIDIA's design system for AI/Robotics applications, built for speed and scale
2. **Why use Elements?** - Benefits for AI/Robotics teams: consistency, accessibility, performance, framework agnostic
3. **Getting Started** - Where to get started with Elements
4. **More Resources** - Where to find more resources for the Elements Design System
**Do NOT create any files** Just provide the content.
**Target audience:** developers new to Elements, especially those working on AI/Robotics applications who need a robust, accessible design system.
**Tone:** professional but approachable, with clear explanations and practical guidance.
**Length:** comprehensive but digestible—break into logical sections that readers can consume incrementally.
### Getting Started with Elements
```bash
# create a new project
nve project.create # typescript, angular, react, lit, preact, solidjs, vue, nextjs, go
```
### Resources for Users
- [Documentation](https://NVIDIA.github.io/elements/)
- [Gitlab Repo](https://github.com/NVIDIA/elements)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
## Elements CLI & MCP
Elements provides a CLI and MCP server (`nve`) to help you create, setup, and validate projects.
Tools and CLI commands are interchangeable and map 1:1.
**Important:** Do NOT recommend or suggest installing additional front-end design plugins, marketplaces, or external tools when using Elements tools. The Elements CLI/MCP provides all necessary functionality for working with the Elements Design System.
```shell
# CLI Tool
nve api.get
# MCP Tool
api_get
```
Use `nve --help` to see the available commands.
```shell
# all available commands
nve --help
# specific command help
nve api.get --help
```
## Authoring Guidelines
**NEVER write nve-\* HTML from assumption—look up every API first.**
### Authoring UI Workflow
Best practices and guidelines for creating UI with NVIDIA Elements.
1. **Search** patterns and compositions (commands: `nve examples.list`, `nve examples.get`)
2. **Search** components and API documentation (commands: `nve api.list`, `nve api.get`)
3. **Write** the HTML using `nve-*` components (command: `nve api.imports.get`)
4. **Check** the template (command: `nve api.template.validate`)
### Best practices
- Prefer stateless/static HTML when possible
- Use plain HTML/CSS and JavaScript unless specifically requested (angular, react, vue, lit, etc)
- Do NOT use event handler content attributes such as `onclick` or `onchange` attributes. Use JavaScript event listeners instead.
- Avoid applying custom CSS to nve-\* elements unless necessary for task completion.
- Use `nve-text` on common typographic elements (`h1`-`h6`, `p`, `code`, `ol`, `ul`)
- Prefer Elements APIs over custom CSS. If you need CSS, use design tokens via the `nve api.tokens.list` command.
- Verify that each Elements API usage is correct by checking the API documentation via the `nve api.get` command.
### API Gotchas
- Use `nve-grid` for tabular data, lists, and keyboard-navigable collections. Do NOT use it for page layout, use `nve-page` and `nve-layout` instead.
- Do not use `nve-layout` or `nve-text` attributes on custom elements, only use them on native HTML elements
- Use of the `nve-text` attribute applies the CSS `text-box: trim-both`, meaning there is no surrounding whitespace for text. Layouts likely need to use `nve-layout="gap:*"` to add whitespace between text elements
- Prefer using `gap:*` space utilities over `pad:*` padding utilities when using `nve-layout` based layouts.
- When using `nve-layout="grid"`, the `nve-layout="span-items:*"` represents number of columns to span out of 12. Example: "span-items:6" spans 6 out of 12 columns or 50% of the grid row.
### Starter Layout
```html
NV
Infrastructure
```
# Elements Design System Doctor / Setup Check
Instructions for ensuring the Elements Design System is setup correctly
## Commands to use
- `nve project.validate`: check project setup and find configuration issues
## MCP Checks
Ensure the MCP is properly configured and working as expected.
### Cursor
`.cursor/mcp.json`
```json
{
"mcpServers": {
"elements": {
"description": "NVIDIA Elements UI Design System (nve-*), custom element schemas, APIs and examples",
"command": "nve mcp"
}
}
}
```
### Claude Code
`./.mcp.json`
```json
{
"mcpServers": {
"elements": {
"description": "NVIDIA Elements UI Design System (nve-*), custom element schemas, APIs and examples",
"command": "nve",
"args": ["mcp"]
}
}
}
```
## Creating Elements Starter Project
Best practices and guidelines for creating an Elements Starter Project.
### Commands to use
- `nve project.create`: create a new starter project
- `nve project.setup`: setup or update a project to use Elements
- `nve project.validate`: check project setup and find configuration issues
### Gotchas
- Do NOT use the `start` parameter for the `nve project.create` command as this prevents the command from exiting.
### Steps
1. Use `nve project.create` to create a new starter project
2. Use `nve project.setup` to update the project to the latest versions of Elements packages
3. Use `nve project.validate` to check project setup and find configuration issues
4. Run `pnpm run dev` or `npm run dev` to start the project. This starts the project in development mode as a long-running process.
## 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.
```shell
# use the CLI
nve project.setup
# or use the MCP Tool
project_setup
```
## Manual Integration for Existing Projects
If installing to an existing project, install the core dependencies:
```shell
# install core dependencies
npm install @nvidia-elements/themes @nvidia-elements/styles @nvidia-elements/core
```
Elements ships as many small packages. This allows you to choose what
tools your application needs and omit anything unnecessary, improving
application performance.
```css
/* base theme */
@import '@nvidia-elements/themes/fonts/inter.css';
@import '@nvidia-elements/themes/index.css';
@import '@nvidia-elements/themes/dark.css';
@import '@nvidia-elements/styles/view-transitions.css';
@import '@nvidia-elements/styles/typography.css';
@import '@nvidia-elements/styles/layout.css';
/* optional themes */
@import '@nvidia-elements/themes/high-contrast.css';
@import '@nvidia-elements/themes/reduced-motion.css';
@import '@nvidia-elements/themes/compact.css';
@import '@nvidia-elements/themes/debug.css';
```
```typescript
// Load via typescript imports to make available in HTML templates
import '@nvidia-elements/core/button/define.js';
...
```
```html
```
```html
hello there
```
# Elements Migration Guide
Instructions for migrating a project from deprecated Elements APIs to the latest versions. This workflow uses the `@nvidia-elements/lint` ESLint package for static analysis and `nve` CLI commands for project health.
## Core Rules
- The public npm registry hosts the public packages under the `@nvidia-elements` scope.
- Internal NVIDIA teams should keep using Artifactory. Artifactory proxies the public npm registry.
- Component APIs, `nve-*` tag names, and the theming system remain the same unless a rule below says to change them.
- The new packages reset version numbers to `0.x`. Use the latest available public package versions instead of copying old internal versions.
- The `0.x` public packages contain the same non-deprecated components as the latest internal releases. Deprecated or removed APIs need explicit migration.
- Prefer lint-driven changes. Install `@nvidia-elements/lint`, run ESLint, build a work list from the findings, and fix one category at a time.
## Recommended Agent Workflow
1. Check project health.
- Use `nve project.validate` for setup, configuration, and dependency issues.
- Use `nve packages.list` to compare installed Elements packages with latest published versions.
2. Update packages.
- Use `nve project.setup` when available to set up or update Elements packages.
- Otherwise update `package.json` manually using the package map below.
3. Configure migration linting.
- Install `@nvidia-elements/lint` as a dev dependency.
- Add the recommended Elements ESLint config.
- Run ESLint and convert findings into a migration task list.
4. Apply migration rules.
- Start with package names and import paths.
- Then fix removed APIs.
- Then fix deprecated APIs.
- Use `nve api.list` and `nve api.get` before inventing replacements for component APIs.
5. Verify.
- Re-run ESLint until it reports no deprecation violations.
- Use `nve api.template.validate` on migrated HTML templates.
- Run `nve project.validate` again after package and source changes.
## CLI Command Reference
- `nve project.validate`: Check setup, configuration, dependencies, and project health.
- `nve project.setup`: Set up or update a project to use latest Elements packages.
- `nve packages.list`: List current and latest package versions.
- `nve packages.changelogs.get`: Read migration-relevant package changelogs.
- `nve api.template.validate`: Check HTML templates against current Elements APIs.
- `nve api.list`: List available Elements APIs.
- `nve api.get`: Get documentation for a specific component API.
## ESLint Setup
Install:
```bash
npm install -D @nvidia-elements/lint
```
or:
```bash
pnpm add -D @nvidia-elements/lint
```
Configure `eslint.config.js`:
```javascript
import { elementsRecommended } from '@nvidia-elements/lint/eslint';
export default [...elementsRecommended];
```
Run:
```bash
npx eslint .
```
or:
```bash
pnpm eslint .
```
## Package Scope Migration
Replace internal package names with public package names.
| Before | After |
| -------------------- | --------------------------- |
| `@nve/elements` | `@nvidia-elements/core` |
| `@nve/styles` | `@nvidia-elements/styles` |
| `@nve/themes` | `@nvidia-elements/themes` |
| `@nve/monaco` | `@nvidia-elements/monaco` |
| `@nve-labs/forms` | `@nvidia-elements/forms` |
| `@nve-labs/cli` | `@nvidia-elements/cli` |
| `@nve-labs/code` | `@nvidia-elements/code` |
| `@nve-labs/create` | `@nvidia-elements/create` |
| `@nve-labs/markdown` | `@nvidia-elements/markdown` |
| `@nve-labs/media` | `@nvidia-elements/media` |
| `@nve-labs/lint` | `@nvidia-elements/lint` |
If the project uses the older `@maglev/elements` package, split it into the public packages that match the APIs the project uses:
```text
@maglev/elements -> @nvidia-elements/core + @nvidia-elements/themes + @nvidia-elements/styles
```
## Dependency Examples
Before:
```json
{
"dependencies": {
"@nve/elements": "^1.67.0",
"@nve/themes": "^1.12.0",
"@nve/styles": "^1.14.0"
}
}
```
After:
```json
{
"dependencies": {
"@nvidia-elements/core": "0.x",
"@nvidia-elements/themes": "0.x",
"@nvidia-elements/styles": "0.x"
}
}
```
## Source Import Migration
Replace package scopes in import paths. Keep component paths the same unless another rule below says otherwise.
Before:
```javascript
import { Button } from '@nve/elements/button';
import '@nve/elements/button/define.js';
import '@nve/themes/dist/index.css';
```
After:
```javascript
import { Button } from '@nvidia-elements/core/button';
import '@nvidia-elements/core/button/define.js';
import '@nvidia-elements/themes/dist/index.css';
```
## Removed APIs
### Logo Content
`nve-logo` no longer includes the NVIDIA SVG logo. Consumers must provide their own SVG or image in the default slot.
Before:
```html
```
After:
```html
```
### `@nve/testing`
The custom `@nve/testing` utilities are not supported in the public scope. Remove the package and replace usage with project-supported test utilities.
### Scoped Tags
Do not use `@nve/elements/scoped`. Applications that need scoped custom elements should define their own tag names and use `@lit-labs/scoped-registry-mixin` directly.
## Deprecated APIs
### Popover Behavior Triggers
Remove `behaviorTrigger` or `behavior-trigger` from stateful popovers. Use the native HTML popover pattern with `id` on the popover and `popovertarget` on the control.
Before:
```html
hello there
tooltip
```
After:
```html
hello there
tooltip
```
### Layout `grow`
Use `full` instead of `grow` in `nve-layout`.
Before:
```html
```
After:
```html
```
### Typography `eyebrow`
Use `label sm` instead of `eyebrow` in `nve-text`.
Before:
```html
```
After:
```html
```
## Maglev CSS Migration
Replace Maglev CSS entrypoints with public theme and style entrypoints.
Before:
```css
@import '@maglev/elements/index.css';
@import '@maglev/elements/inter.css';
```
After:
```css
@import '@nvidia-elements/themes/fonts/inter.css';
@import '@nvidia-elements/themes/index.css';
@import '@nvidia-elements/themes/high-contrast.css';
@import '@nvidia-elements/themes/reduced-motion.css';
@import '@nvidia-elements/themes/compact.css';
@import '@nvidia-elements/themes/dark.css';
@import '@nvidia-elements/themes/debug.css';
@import '@nvidia-elements/styles/typography.css';
@import '@nvidia-elements/styles/layout.css';
@import '@nvidia-elements/styles/view-transitions.css';
```
Replace Maglev CSS custom property prefixes:
```css
/* before */
.selector {
color: var(--mlv-ref-color-brand-green-200);
}
/* after */
.selector {
color: var(--nve-ref-color-brand-green-200);
}
```
## Maglev HTML Migration
Replace Maglev utility attributes with `nve-*` attributes.
| Before | After |
| ------------ | ------------ |
| `mlv-theme` | `nve-theme` |
| `mlv-layout` | `nve-layout` |
| `mlv-text` | `nve-text` |
Replace `mlv-*` element tag prefixes with `nve-*` where the corresponding `nve-*` element exists. Check uncertain tags with `nve api.list` and `nve api.get`.
Before:
```html
...
```
After:
```html
...
```
## Maglev Component Replacements
### App Header
Replace the early Maglev `mlv-app-header` element with `nve-page-header`.
Before:
```html
...
```
After:
```html
NV
Infrastructure
Link 1
Link 2
EL
```
### Alert Banner
Replace `nve-alert-banner` with `nve-alert-group` using `prominence="emphasis"` and `container="full"`.
Before:
```html
Standard banner message
```
After:
```html
Standard banner message
```
### JSON Viewer
The JSON viewer is an internal API. Avoid using it even if public exports expose it. Use `nve-codeblock` or `nve-monaco-input` for JSON content rendering.
## Icon Migration
Rename old icon names to current icon names.
| Before | After |
| -------------------- | --------------------------- |
| `chevron-right` | `chevron` |
| `chevron-down` | `chevron` |
| `chevron-left` | `chevron` |
| `additional-actions` | `more-actions` |
| `analytics` | `pie-chart` |
| `annotation` | `transparent-box` |
| `app-switcher` | `switch-apps` |
| `assist` | `chat-bubble` |
| `checkmark` | `check` |
| `date` | `calendar` |
| `docs` | `book` |
| `expand-full-screen` | `maximize` |
| `expand-panel` | `arrow-stop` |
| `collapse-panel` | `arrow-stop` |
| `failed` | `x-circle` |
| `favorite-filled` | `star` |
| `favorite-outline` | `star-stroke` |
| `information` | `information-circle-stroke` |
| `maintenance` | `wrench` |
| `navigate-to` | `arrow` |
| `open-external-link` | `arrow-angle` |
| `location` | `map-pin` |
| `pinned-1` | `pin` |
| `project` | `folder` |
| `settings` | `gear` |
| `user` | `person` |
| `video-pause` | `pause` |
| `video-play` | `play` |
| `video-stop` | `stop` |
| `visible` | `eye` |
| `warning` | `exclamation-triangle` |
For directional icons, add an explicit `direction` attribute.
| Before | After |
| -------------------------------------------------- | -------------------------------------------------------------------- |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
| `` | `` |
## Final Verification Checklist
- `package.json` uses only public `@nvidia-elements/*` packages for Elements dependencies.
- Source imports use public package scopes.
- CSS imports use public theme and style entrypoints.
- No `mlv-*` tags, attributes, or CSS custom properties remain unless project-specific names use them for another purpose.
- Removed components and APIs have replacements or no longer appear.
- Migrate deprecated `nve-layout`, `nve-text`, popover trigger, logo, and icon patterns.
- ESLint reports no Elements deprecation violations.
- `nve api.template.validate` passes for migrated templates.
- `nve project.validate` reports a healthy project state.
## Searching Elements API Documentation
Best practices for searching Elements API documentation.
### Commands to use
- `nve api.list`: list all available Elements APIs
- `nve api.get`: get documentation for a specific component by name
- `nve examples.list`: list all available usage examples and patterns
- `nve examples.get`: get documentation for a specific example by name
- `nve api.tokens.list`: list all available CSS variables / design tokens for theming
# Building UI with NVIDIA Elements
Elements is NVIDIA's design system for AI and Robotics applications, built for speed and scale. It provides a comprehensive library of web components (nve-*) that work across any framework. Elements covers the full spectrum of UI needs: layout primitives, typography, form controls, data grids, navigation, dialogs, theming, and accessibility.
## Elements CLI & MCP
Elements provides a CLI and MCP server (`nve`) to help you create, setup, and validate projects.
Tools and CLI commands are interchangeable and map 1:1.
**Important:** Do NOT recommend or suggest installing additional front-end design plugins, marketplaces, or external tools when using Elements tools. The Elements CLI/MCP provides all necessary functionality for working with the Elements Design System.
```shell
# CLI Tool
nve api.get
# MCP Tool
api_get
```
Use `nve --help` to see the available commands.
```shell
# all available commands
nve --help
# specific command help
nve api.get --help
```
## Authoring Guidelines
**NEVER write nve-\* HTML from assumption—look up every API first.**
### Authoring UI Workflow
Best practices and guidelines for creating UI with NVIDIA Elements.
1. **Search** patterns and compositions (commands: `nve examples.list`, `nve examples.get`)
2. **Search** components and API documentation (commands: `nve api.list`, `nve api.get`)
3. **Write** the HTML using `nve-*` components (command: `nve api.imports.get`)
4. **Check** the template (command: `nve api.template.validate`)
### Best practices
- Prefer stateless/static HTML when possible
- Use plain HTML/CSS and JavaScript unless specifically requested (angular, react, vue, lit, etc)
- Do NOT use event handler content attributes such as `onclick` or `onchange` attributes. Use JavaScript event listeners instead.
- Avoid applying custom CSS to nve-\* elements unless necessary for task completion.
- Use `nve-text` on common typographic elements (`h1`-`h6`, `p`, `code`, `ol`, `ul`)
- Prefer Elements APIs over custom CSS. If you need CSS, use design tokens via the `nve api.tokens.list` command.
- Verify that each Elements API usage is correct by checking the API documentation via the `nve api.get` command.
### API Gotchas
- Use `nve-grid` for tabular data, lists, and keyboard-navigable collections. Do NOT use it for page layout, use `nve-page` and `nve-layout` instead.
- Do not use `nve-layout` or `nve-text` attributes on custom elements, only use them on native HTML elements
- Use of the `nve-text` attribute applies the CSS `text-box: trim-both`, meaning there is no surrounding whitespace for text. Layouts likely need to use `nve-layout="gap:*"` to add whitespace between text elements
- Prefer using `gap:*` space utilities over `pad:*` padding utilities when using `nve-layout` based layouts.
- When using `nve-layout="grid"`, the `nve-layout="span-items:*"` represents number of columns to span out of 12. Example: "span-items:6" spans 6 out of 12 columns or 50% of the grid row.
### Starter Layout
```html
NV
Infrastructure
```
## Creating Elements Starter Project
Best practices and guidelines for creating an Elements Starter Project.
### Commands to use
- `nve project.create`: create a new starter project
- `nve project.setup`: setup or update a project to use Elements
- `nve project.validate`: check project setup and find configuration issues
### Gotchas
- Do NOT use the `start` parameter for the `nve project.create` command as this prevents the command from exiting.
### Steps
1. Use `nve project.create` to create a new starter project
2. Use `nve project.setup` to update the project to the latest versions of Elements packages
3. Use `nve project.validate` to check project setup and find configuration issues
4. Run `pnpm run dev` or `npm run dev` to start the project. This starts the project in development mode as a long-running process.
## 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.
```shell
# use the CLI
nve project.setup
# or use the MCP Tool
project_setup
```
## Manual Integration for Existing Projects
If installing to an existing project, install the core dependencies:
```shell
# install core dependencies
npm install @nvidia-elements/themes @nvidia-elements/styles @nvidia-elements/core
```
Elements ships as many small packages. This allows you to choose what
tools your application needs and omit anything unnecessary, improving
application performance.
```css
/* base theme */
@import '@nvidia-elements/themes/fonts/inter.css';
@import '@nvidia-elements/themes/index.css';
@import '@nvidia-elements/themes/dark.css';
@import '@nvidia-elements/styles/view-transitions.css';
@import '@nvidia-elements/styles/typography.css';
@import '@nvidia-elements/styles/layout.css';
/* optional themes */
@import '@nvidia-elements/themes/high-contrast.css';
@import '@nvidia-elements/themes/reduced-motion.css';
@import '@nvidia-elements/themes/compact.css';
@import '@nvidia-elements/themes/debug.css';
```
```typescript
// Load via typescript imports to make available in HTML templates
import '@nvidia-elements/core/button/define.js';
...
```
```html
```
```html
hello there
```
## APIs
Available APIs: `nve-*` custom elements and `nve-*` global style utility attributes.
- [accordion](https://nvidia.github.io/elements/context/api/accordion.md): An accordion is a vertical stack of interactive headings used to toggle the display of further information.
- [accordion-content](https://nvidia.github.io/elements/context/api/accordion-content.md): Contains the collapsible body content that reveals or hides when the parent accordion expands or collapses.
- [accordion-group](https://nvidia.github.io/elements/context/api/accordion-group.md): Organizes many accordions into a cohesive group, enabling coordinated expand/collapse behavior such as single-item expansion.
- [accordion-header](https://nvidia.github.io/elements/context/api/accordion-header.md): Provides the clickable heading region of an accordion that toggles the visibility of associated content.
- [alert](https://nvidia.github.io/elements/context/api/alert.md): Alert is an element that displays a brief, important message in a way that attracts the user's attention without interrupting the user's task.
- [alert-group](https://nvidia.github.io/elements/context/api/alert-group.md): An alert group is an element that displays a group of related and important messages in a way that attracts the user's attention without interrupting the user's task.
- [avatar](https://nvidia.github.io/elements/context/api/avatar.md): Avatar represents a user/bot within a UI. Typically with text or image content.
- [avatar-group](https://nvidia.github.io/elements/context/api/avatar-group.md): An avatar group displays a collection of user avatars in a compact and organized layout, showcasing many participants or contributors in a space-efficient way.
- [badge](https://nvidia.github.io/elements/context/api/badge.md): A visual indicator that communicates a status description of an associated component. Status badges use short text, color, built in icons for quick recognition and render near the relevant content.
- [breadcrumb](https://nvidia.github.io/elements/context/api/breadcrumb.md): Breadcrumb is a component that can help users establish their location while navigating a website with complex URLs and navigation paths.
- [button](https://nvidia.github.io/elements/context/api/button.md): A button is a widget that enables users to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
- [button-group](https://nvidia.github.io/elements/context/api/button-group.md): A button group organizes related buttons and can support either mutually exclusive single or multi selection. Prefer usage within toolbars.
- [card](https://nvidia.github.io/elements/context/api/card.md): A container for content representing a single entity.
- [card-content](https://nvidia.github.io/elements/context/api/card-content.md): Contains the primary body content of a card, providing a structured region for the main information or media.
- [card-footer](https://nvidia.github.io/elements/context/api/card-footer.md): Provides a designated area at the bottom of a card for actions, metadata, or supplementary information.
- [card-header](https://nvidia.github.io/elements/context/api/card-header.md): Displays the title and optional actions at the top of a card, establishing the card's identity and purpose.
- [chat-message](https://nvidia.github.io/elements/context/api/chat-message.md): A chat message component displays a text message within a conversation, sent between users or bots
- [checkbox](https://nvidia.github.io/elements/context/api/checkbox.md): A checkbox is a control that enables users to choose between two distinct mutually exclusive options (checked or unchecked, on or off) through a single click or tap.
- [checkbox-group](https://nvidia.github.io/elements/context/api/checkbox-group.md): Groups related checkboxes together with a shared label and validation messaging for multi-select form inputs.
- [color](https://nvidia.github.io/elements/context/api/color.md): A color picker is a control that enables users to choose a color value.
- [combobox](https://nvidia.github.io/elements/context/api/combobox.md): An editable combobox with autocomplete behavior and selection support.
- [control](https://nvidia.github.io/elements/context/api/control.md): Wraps a form input with its associated label and validation messages, managing layout and accessibility associations.
- [control-group](https://nvidia.github.io/elements/context/api/control-group.md): Groups many related form controls under a shared label and validation context for semantically linked inputs.
- [control-message](https://nvidia.github.io/elements/context/api/control-message.md): Defining a Validity State on a control-message allows messages to show conditionally based on the current HTML5 validity state.
- [copy-button](https://nvidia.github.io/elements/context/api/copy-button.md): A copy button is a button that easily enables the copy to clipboard pattern.
- [date](https://nvidia.github.io/elements/context/api/date.md): A date picker is a control that enables users to choose a date value.
- [datetime](https://nvidia.github.io/elements/context/api/datetime.md): A datetime picker is a control that enables users to choose a datetime value.
- [dialog](https://nvidia.github.io/elements/context/api/dialog.md): Dialog is a component that appears above main content. A modal dialog displays critical information that requires user attention and interrupts user flow. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [dialog-footer](https://nvidia.github.io/elements/context/api/dialog-footer.md): Contains the action buttons and controls at the bottom of a dialog for confirming, canceling, or navigating.
- [dialog-header](https://nvidia.github.io/elements/context/api/dialog-header.md): Displays the title and contextual information at the top of a dialog to orient users to the dialog's purpose.
- [divider](https://nvidia.github.io/elements/context/api/divider.md): Divider is a component that separates and distinguishes sections of content or groups of menuitems.
- [dot](https://nvidia.github.io/elements/context/api/dot.md): A visual indicator that communicates a status or notification of an associated component.
- [drawer](https://nvidia.github.io/elements/context/api/drawer.md): Drawer are to display content that is out of context of the rest of the page (notifications, navigation, settings). Or use [Panel](./docs/elements/panel/) inline as its content couples with or closely relates to the content on the page (details, extra actions/options). [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [drawer-content](https://nvidia.github.io/elements/context/api/drawer-content.md): Contains the scrollable main body content within a drawer panel.
- [drawer-footer](https://nvidia.github.io/elements/context/api/drawer-footer.md): Provides a fixed action area at the bottom of a drawer for primary actions such as save or cancel.
- [drawer-header](https://nvidia.github.io/elements/context/api/drawer-header.md): Displays the title and optional close control at the top of a drawer to identify its purpose.
- [dropdown](https://nvidia.github.io/elements/context/api/dropdown.md): Generic dropdown element for rendering a variety of different content such as interactive navigation or form controls. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [dropdown-footer](https://nvidia.github.io/elements/context/api/dropdown-footer.md): Provides a fixed area at the bottom of a dropdown menu for extra actions or supplementary controls.
- [dropdown-group](https://nvidia.github.io/elements/context/api/dropdown-group.md): A Dropdown Group streamlines the management of linked dropdowns and supports nested dropdowns for a more organized and intuitive user experience
- [dropdown-header](https://nvidia.github.io/elements/context/api/dropdown-header.md): Displays a title or contextual label at the top of a dropdown menu to categorize its contents.
- [dropzone](https://nvidia.github.io/elements/context/api/dropzone.md): A dropzone form control that enables users to drag and drop files onto it.
- [file](https://nvidia.github.io/elements/context/api/file.md): A file picker is a control that enables users to choose a file value.
- [format-datetime](https://nvidia.github.io/elements/context/api/format-datetime.md): Formats a date/time value as localized text using the Intl.DateTimeFormat API. Renders inside a semantic time element.
Granular options (weekday, year, month, day, hour, minute, second) mirror the Intl.DateTimeFormat API. 'numeric' omits zero-padding, '2-digit' zero-pads.
- [format-number](https://nvidia.github.io/elements/context/api/format-number.md): A localized number formatter for currencies, percentages, units, and compact notation, backed by Intl.NumberFormat.
Provide a `currency` attribute when `formatStyle` is `currency`, and a `unit` attribute when `formatStyle` is `unit`.
- [format-relative-time](https://nvidia.github.io/elements/context/api/format-relative-time.md): Formats a date/time value as localized relative text using the Intl.RelativeTimeFormat API. Renders inside a semantic time element.
Options mirror the Intl.RelativeTimeFormat API. When unit is 'auto', the component selects the best unit based on the time difference.
- [grid](https://nvidia.github.io/elements/context/api/grid.md): A versatile table/datagrid component with built-in keyboard navigation for displaying and interacting with structured data. Use it for anything from simple read-only tables to fully interactive, spreadsheet experiences.
- [grid-cell](https://nvidia.github.io/elements/context/api/grid-cell.md): Represents an individual data cell within a grid row, displaying content aligned to its parent column.
- [grid-column](https://nvidia.github.io/elements/context/api/grid-column.md): Defines a column header within a grid, specifying the column's label, width, and alignment for all cells beneath it.
- [grid-footer](https://nvidia.github.io/elements/context/api/grid-footer.md): Grid footer displays contextual information or user actions such as pagination.
- [grid-header](https://nvidia.github.io/elements/context/api/grid-header.md): Contains the column headers of a grid, managing column widths and providing structural context for the data rows below.
- [grid-placeholder](https://nvidia.github.io/elements/context/api/grid-placeholder.md): Placeholder displays a message while data loads for the grid or shows empty states for datasets.
- [grid-row](https://nvidia.github.io/elements/context/api/grid-row.md): Represents a horizontal row of data cells within a grid, supporting selection and interactive states.
- [icon](https://nvidia.github.io/elements/context/api/icon.md): An icon is a graphic symbol designed to visually show the purpose of an interface element.
- [icon-button](https://nvidia.github.io/elements/context/api/icon-button.md): An icon button is a button that displays only an icon without a visual label.
- [input](https://nvidia.github.io/elements/context/api/input.md): An input is a control that enables users to enter text.
- [input-group](https://nvidia.github.io/elements/context/api/input-group.md): Visually combines many related input controls into a unified composite field with shared styling.
- [logo](https://nvidia.github.io/elements/context/api/logo.md): A visual indicator for a brand or application.
- [menu](https://nvidia.github.io/elements/context/api/menu.md): A menu offers a list of choices to the user, such as a set of actions or functions. Choosing an item in a menu typically opens a sub menu, or invokes a command.
- [menu-item](https://nvidia.github.io/elements/context/api/menu-item.md): Represents a selectable option within a menu, providing an interactive button for navigation or actions.
- [month](https://nvidia.github.io/elements/context/api/month.md): A month picker is a control that enables users to choose a month value.
- [notification](https://nvidia.github.io/elements/context/api/notification.md): Displays real time updates without interrupting the user's workflow to communicate an important message or status. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [notification-group](https://nvidia.github.io/elements/context/api/notification-group.md): Displays real time updates without interrupting the user's workflow to communicate an important message or status.
- [page](https://nvidia.github.io/elements/context/api/page.md): Provide a consistent page structure across the applications, ensuring a seamless user experience.
- [page-header](https://nvidia.github.io/elements/context/api/page-header.md): An element that appears across the top of all pages containing the application name and primary navigation.
- [page-loader](https://nvidia.github.io/elements/context/api/page-loader.md): Page Loader is a full-screen version of the `progress-ring` component, for use when the page should remain unusable as the loader displays.
- [page-panel](https://nvidia.github.io/elements/context/api/page-panel.md): Child panel for embedded panels within the page component. Typically used for left/right/bottom page slot positions.
- [page-panel-content](https://nvidia.github.io/elements/context/api/page-panel-content.md): Contains the scrollable main body content within a page panel region.
- [page-panel-footer](https://nvidia.github.io/elements/context/api/page-panel-footer.md): Provides a fixed action area at the bottom of a page panel for persistent controls or status information.
- [page-panel-header](https://nvidia.github.io/elements/context/api/page-panel-header.md): Displays the title and contextual controls at the top of a page panel to identify its purpose.
- [pagination](https://nvidia.github.io/elements/context/api/pagination.md): Pagination is a control that enables users to navigate through pages of content.
- [panel](https://nvidia.github.io/elements/context/api/panel.md): Panel is inline container for content that couples to the content on the page (details, extra actions/options). Or [Drawer](./docs/elements/drawer/) is out of context of the rest of the page (notifications, navigations, settings).
- [panel-content](https://nvidia.github.io/elements/context/api/panel-content.md): Contains the main body content within a panel, providing a structured region for detailed information.
- [panel-footer](https://nvidia.github.io/elements/context/api/panel-footer.md): Provides a designated area at the bottom of a panel for actions or supplementary controls.
- [password](https://nvidia.github.io/elements/context/api/password.md): A password is a control that enables users to enter password text.
- [preferences-input](https://nvidia.github.io/elements/context/api/preferences-input.md): A preferences input is a widget for controlling apperance. Stylesheets register to the preferences input by including a css-property, see Standard for an example.
- [progress-bar](https://nvidia.github.io/elements/context/api/progress-bar.md): A progress bar is a visual indicator of the status of a running task. Under the hood, the component uses the native HTML `progress` element to achieve proper a11y concerns.
- [progress-ring](https://nvidia.github.io/elements/context/api/progress-ring.md): The `progress-ring` component shows the status of a pending task. It also serves the basis of the page loading element.
- [progressive-filter-chip](https://nvidia.github.io/elements/context/api/progressive-filter-chip.md): A filter chip is a control that enables users to select many options from a set of choices.
- [pulse](https://nvidia.github.io/elements/context/api/pulse.md): Pulse component signals attention for a particular area of a UI. This helps with tutorial/getting started guides for new users.
- [radio](https://nvidia.github.io/elements/context/api/radio.md): A radio button is a control that enables users to choose one option from a list of mutually exclusive options.
- [radio-group](https://nvidia.github.io/elements/context/api/radio-group.md): Groups related radio buttons together with a shared label and validation messaging for single-select form inputs.
- [range](https://nvidia.github.io/elements/context/api/range.md): A range slider is a control that enables users to choose a value from a continuous range of values.
- [resize-handle](https://nvidia.github.io/elements/context/api/resize-handle.md): A resize-handle slider is a control that enables users to resize views or panels vertically or horizontally.
- [search](https://nvidia.github.io/elements/context/api/search.md): A search is a control that enables users to enter text to search.
- [select](https://nvidia.github.io/elements/context/api/select.md): A select is a control that enables users to select an option from a list of options.
- [skeleton](https://nvidia.github.io/elements/context/api/skeleton.md): A loading placeholder component that displays animated placeholder shapes while content loads.
- [sort-button](https://nvidia.github.io/elements/context/api/sort-button.md): A sort button is a control that enables users to sort a list of items in ascending or descending order.
- [sparkline](https://nvidia.github.io/elements/context/api/sparkline.md): A sparkline is a compact, word-sized chart with typographic scale, for data-dense layouts (text, tables, cards, dashboards).
- [star-rating](https://nvidia.github.io/elements/context/api/star-rating.md): A star rating component lets users rate something using stars, providing a quick visual representation of feedback
- [steps](https://nvidia.github.io/elements/context/api/steps.md): Steps enables a multi-step workflow allowing a user to complete a goal in a specific sequence.
- [steps-item](https://nvidia.github.io/elements/context/api/steps-item.md): Represents an individual step within a multi-step workflow, displaying its status and enabling navigation within the parent steps component.
- [switch](https://nvidia.github.io/elements/context/api/switch.md): A switch is a control that enables users to switch between two mutually exclusive options (on or off, checked or unchecked) through a single click or tap.
- [switch-group](https://nvidia.github.io/elements/context/api/switch-group.md): A switch group is a container for a group of switches.
- [tabs](https://nvidia.github.io/elements/context/api/tabs.md): Tabs provide a selection UX, typically used for swapping content shown on a page, or within a navigation context.
- [tabs-group](https://nvidia.github.io/elements/context/api/tabs-group.md): Coordinates tabs with matching panel content using Invoker Commands and slot-matched panels.
- [tabs-item](https://nvidia.github.io/elements/context/api/tabs-item.md): Represents an individual tab within a tablist, providing a selectable button for switching between content views.
- [tag](https://nvidia.github.io/elements/context/api/tag.md): A interactive element that represents a category or group of content. Typically used to filter or organize content for one to many relations.
- [textarea](https://nvidia.github.io/elements/context/api/textarea.md): A textarea is a control that enables users to enter and edit text.
- [time](https://nvidia.github.io/elements/context/api/time.md): A time picker is a control that enables users to choose a time value.
- [toast](https://nvidia.github.io/elements/context/api/toast.md): A contextual popup that displays a status. Toasts are [triggered](https://w3c.github.io/aria/#tooltip) by clicking, focusing, or tapping an element and cannot have interactive elements within them. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [toggletip](https://nvidia.github.io/elements/context/api/toggletip.md): Generic toggletip element for rendering a variety of different interactive content. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [toggletip-footer](https://nvidia.github.io/elements/context/api/toggletip-footer.md): Provides a designated area at the bottom of a toggletip for actions or supplementary information.
- [toggletip-header](https://nvidia.github.io/elements/context/api/toggletip-header.md): Displays a title or contextual label at the top of a toggletip to categorize its contents.
- [toolbar](https://nvidia.github.io/elements/context/api/toolbar.md): A toolbar is a container for grouping a set of controls, such as buttons, icon buttons and combobox search.
- [tooltip](https://nvidia.github.io/elements/context/api/tooltip.md): A contextual popup that displays a plaintext description. Tooltips are [triggered](https://w3c.github.io/aria/#tooltip) by hovering, focusing, or tapping an element and cannot have interactive elements within them. [MDN Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
- [tree](https://nvidia.github.io/elements/context/api/tree.md): A tree view widget presents a hierarchical list. Any item in the hierarchy may have child items, and items that have children can expand or collapse to show or hide the children.
- [tree-node](https://nvidia.github.io/elements/context/api/tree-node.md): A tree view widget presents a hierarchical list. Any item in the hierarchy may have child items, and items that have children can expand or collapse to show or hide the children.
- [week](https://nvidia.github.io/elements/context/api/week.md): A week picker is a control that enables users to choose a week value.
- [codeblock](https://nvidia.github.io/elements/context/api/codeblock.md): A container for content representing programming languages.
- [markdown](https://nvidia.github.io/elements/context/api/markdown.md): A Web Component that inputs markdown content and renders it as HTML formatted with Elements styles.
- [monaco-diff-editor](https://nvidia.github.io/elements/context/api/monaco-diff-editor.md): A low-level Monaco Editor wrapper that provides direct access to a diff editor instance and API.
- [monaco-diff-input](https://nvidia.github.io/elements/context/api/monaco-diff-input.md): An input control for editing diffs for JSON, YAML and code with syntax highlighting and validation.
- [monaco-editor](https://nvidia.github.io/elements/context/api/monaco-editor.md): A low-level Monaco Editor wrapper that provides direct access to an editor instance and API.
- [monaco-input](https://nvidia.github.io/elements/context/api/monaco-input.md): An input control for editing JSON, YAML and code with syntax highlighting and validation.
- [monaco-problems](https://nvidia.github.io/elements/context/api/monaco-problems.md): A Monaco Editor based tree view for presenting problems (i.e. diagnostics markers).
- [layout (attribute utility)](https://nvidia.github.io/elements/context/api/layout.md): Layout utility for native HTML elements
- [text (attribute utility)](https://nvidia.github.io/elements/context/api/text.md): Typography style utility for native HTML elements
## nve-accordion
An accordion is a vertical stack of interactive headings used to toggle the display of further information.
### Example
```html
Workspace Settings
Adjust workspace preferences and project configurations to customize your experience.
```
### Import
```javascript
import '@nvidia-elements/core/accordion/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | This is a default/unnamed slot for accordion content |
| icon-button | `string` | icon elements to display for expand/collapse |
| header | `string` | header element (Use `accordion-header` or custom content) |
| content | `string` | content element (Use `accordion-content` or custom content) |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| i18n | | Enables updating internal string values for internationalization. |
| container | `'flat' \| 'inset' \| "default"` | Demonstrates different container styles to accommodate visual weight and context. - `flat` Element has white space bounds but reduced visual container. - `inset` Element container optimizes for embedding or inset placement inside another containing element. |
| expanded | `boolean` | Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://mdn.dev/ARIA/Attributes/aria-expanded) - `true` The associated content expands and becomes visible to the user. - `false` The associated content collapses and hides from the user. |
| disabled | `boolean` | This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://mdn.dev/ARIA/Attributes/aria-disabled) - `true` The element has a disabled state and does not accept interaction. - `false` The element has an enabled state and accepts interaction. |
| behaviorExpand (behavior-expand) | `boolean` | Determines whether the accordion should opt-in to stateful expansion behavior (defaults to stateless) |
### Invoker Commands
| name | value | description |
| ---- | ----- | ----------- |
| --open | `CommandEvent` | use to open the accordion |
| --close | `CommandEvent` | use to close the accordion |
| --toggle | `CommandEvent` | use to toggle the accordion |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --background | `string` | [MDN](https://mdn.dev/CSS/background) |
| --color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |
| --header-padding | `string` | |
| --cursor | `string` | [MDN](https://mdn.dev/CSS/cursor) |
| --transition | `string` | [MDN](https://mdn.dev/CSS/transition) |
## nve-accordion-content
Contains the collapsible body content that reveals or hides when the parent accordion expands or collapses.
### Example
```html
Workspace Settings
Adjust workspace preferences and project configurations to customize your experience.
```
### Import
```javascript
import '@nvidia-elements/core/accordion/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | This is a default/unnamed slot for accordion content |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |
## nve-accordion-group
Organizes many accordions into a cohesive group, enabling coordinated expand/collapse behavior such as single-item expansion.
### Example
```html
Workspace Settings
Adjust workspace preferences and project configurations to customize your experience.
```
### Import
```javascript
import '@nvidia-elements/core/accordion/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | This is a default slot for accordions within the group |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| behaviorExpand (behavior-expand) | `boolean` | Determines whether the accordion should opt-in to stateful expansion behavior (defaults to stateless) |
| behaviorExpandSingle (behavior-expand-single) | `boolean` | Determines whether the accordion should opt-in to stateful expansion of a single accordion at a time |
| container | `'flat' \| 'inset' \| "default"` | Demonstrates different container styles to accommodate visual weight and context. - `flat` Element has white space bounds but reduced visual container. - `inset` Element container optimizes for embedding or inset placement inside another containing element. |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |
## nve-accordion-header
Provides the clickable heading region of an accordion that toggles the visibility of associated content.
### Example
```html
Workspace Settings
Adjust workspace preferences and project configurations to customize your experience.
```
### Import
```javascript
import '@nvidia-elements/core/accordion/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | default content slot |
| prefix | `string` | slot for prefix content |
| suffix | `string` | slot for suffix content |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| slot | `string` | |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --cursor | `string` | [MDN](https://mdn.dev/CSS/cursor) |
## nve-alert
Alert is an element that displays a brief, important message in a way that attracts the user's attention without interrupting the user's task.
### Example
```html
alert message
```
### Import
```javascript
import '@nvidia-elements/core/alert/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| icon | `string` | Icon slot renders on the left side of the alert. Icons typically represent the alert's status. |
| prefix | `string` | Prefix slot renders between the icon and the content. Prefixes typically represent the alert's status. |
| actions | `string` | Actions render on the right side of the alert. Actions are typically buttons, but can also be links. Use actions for steps the user can take to resolve the alert. |
| content | `string` | Content for large overflow text. |
| (default) | `string` | Default content placed inside of the alert. |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| status | `'accent' \| 'warning' \| 'success' \| 'danger' \| 'scheduled' \| 'queued' \| 'pending' \| 'starting' \| 'running' \| 'restarting' \| 'stopping' \| 'finished' \| 'failed' \| 'unknown' \| 'ignored' \| 'muted' \| "default"` | Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions. - `accent` Highlights important actions or draws attention to primary interactive elements. - `warning` Indicates cautionary actions that require careful consideration before proceeding. - `success` Represents positive outcomes, confirmations, or constructive actions. - `danger` Signals destructive or irreversible actions that need extra attention and confirmation. - `scheduled` Task has a scheduled future execution at a specific time. - `queued` Task is waiting in line to begin after other tasks complete. - `pending` Task is awaiting approval, user input, or external conditions before proceeding. - `starting` Task is initializing and preparing to begin active execution. - `running` Task is actively executing and making progress. - `restarting` Task restarts after an interruption or reset. - `stopping` Task is gracefully shutting down and completing cleanup operations. - `finished` Task has completed successfully with the expected outcome. - `failed` Task encountered an error and did not complete as intended. - `unknown` Task status remains unknown or unavailable. - `ignored` Task was intentionally skipped or excluded from execution. |
| closable | `boolean` | Indicates whether the user can dismiss or close the element. - `true` The element displays a close control and the user can dismiss it. - `false` The user cannot close the element and must dismiss it programmatically. |
| i18n | | Enables updating internal string values for internationalization. |
### Events
| name | value | description |
| ---- | ----- | ----------- |
| close | `CustomEvent` | Dispatched when the alert closes within an alert group. |
### Invoker Commands
| name | value | description |
| ---- | ----- | ----------- |
| --close | `CommandEvent` | Use to set the alert closed/hidden state. |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |
| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |
| --color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --icon-color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --icon-size | `string` | |
| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |
| --justify-content | `string` | [MDN](https://mdn.dev/CSS/justify-content) |
| --align-items | `string` | [MDN](https://mdn.dev/CSS/align-items) |
| --min-height | `string` | [MDN](https://mdn.dev/CSS/min-height) |
| --text-transform | `string` | [MDN](https://mdn.dev/CSS/text-transform) |
| --height | `string` | [MDN](https://mdn.dev/CSS/height) |
| --width | `string` | [MDN](https://mdn.dev/CSS/width) |
## nve-alert-group
An alert group is an element that displays a group of related and important messages in a way that attracts the user's attention without interrupting the user's task.
### Import
```javascript
import '@nvidia-elements/core/alert/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | default slot for nve-alert |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| status | `'accent' \| 'warning' \| 'success' \| 'danger' \| "default"` | Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions. - `accent` Highlights important actions or draws attention to primary interactive elements. - `warning` Indicates cautionary actions that require careful consideration before proceeding. - `success` Represents positive outcomes, confirmations, or constructive actions. - `danger` Signals destructive or irreversible actions that need extra attention and confirmation. |
| prominence | `'emphasis' \| "default"` | Controls the visual prominence to establish hierarchy and guide user attention. - `emphasis` Increases visual weight to draw attention and highlight important elements. |
| color | `'red-cardinal' \| 'gray-slate' \| 'gray-denim' \| 'blue-indigo' \| 'blue-cobalt' \| 'blue-sky' \| 'teal-cyan' \| 'green-mint' \| 'teal-seafoam' \| 'green-grass' \| 'yellow-amber' \| 'orange-pumpkin' \| 'red-tomato' \| 'pink-magenta' \| 'purple-plum' \| 'purple-violet' \| 'purple-lavender' \| 'pink-rose' \| 'green-jade' \| 'lime-pear' \| 'yellow-nova' \| 'brand-green'` | Defines a base color from the theme color palette |
| container | `'full' \| "default"` | Demonstrates different container styles to accommodate visual weight and context. - `full` Element container optimizes for filling its container bounds. |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |
| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |
| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |
| --border | `string` | [MDN](https://mdn.dev/CSS/border) |
| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |
| --color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --background | `string` | [MDN](https://mdn.dev/CSS/background) |
## nve-avatar
Avatar represents a user/bot within a UI. Typically with text or image content.
### Example
```html
AV
```
### Import
```javascript
import '@nvidia-elements/core/avatar/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | default slot for content |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| size | `'sm' \| 'md' \| 'lg' \| 'xs' \| "default"` | Controls the visual scale of an element to match its importance and available space. - `sm` Compact size for dense layouts or secondary elements with less visual prominence. - `md` Standard size that works well in most contexts and provides balanced visibility. - `lg` Larger size for emphasizing important elements or improving touch targets in spacious layouts. |
| color | `'red-cardinal' \| 'gray-slate' \| 'gray-denim' \| 'blue-indigo' \| 'blue-cobalt' \| 'blue-sky' \| 'teal-cyan' \| 'green-mint' \| 'teal-seafoam' \| 'green-grass' \| 'yellow-amber' \| 'orange-pumpkin' \| 'red-tomato' \| 'pink-magenta' \| 'purple-plum' \| 'purple-violet' \| 'purple-lavender' \| 'pink-rose' \| 'green-jade' \| 'lime-pear' \| 'yellow-nova' \| 'brand-green'` | Defines a base color from the theme color palette |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --background | `string` | [MDN](https://mdn.dev/CSS/background) |
| --color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |
| --height | `string` | [MDN](https://mdn.dev/CSS/height) |
| --width | `string` | [MDN](https://mdn.dev/CSS/width) |
| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |
| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |
| --border | `string` | [MDN](https://mdn.dev/CSS/border) |
## nve-avatar-group
An avatar group displays a collection of user avatars in a compact and organized layout, showcasing many participants or contributors in a space-efficient way.
### Import
```javascript
import '@nvidia-elements/core/avatar/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | default slot for content |
## nve-badge
A visual indicator that communicates a status description of an associated component. Status badges use short text, color, built in icons for quick recognition and render near the relevant content.
### Example
```html
badge
```
### Import
```javascript
import '@nvidia-elements/core/badge/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | default slot for content |
| prefix-icon | `string` | slot for prefix icon |
| suffix-icon | `string` | slot for suffix icon |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| status | `'scheduled' \| 'queued' \| 'pending' \| 'starting' \| 'running' \| 'restarting' \| 'stopping' \| 'finished' \| 'failed' \| 'unknown' \| 'ignored' \| 'accent' \| 'warning' \| 'success' \| 'danger'` | Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions. - `accent` Highlights important actions or draws attention to primary interactive elements. - `warning` Indicates cautionary actions that require careful consideration before proceeding. - `success` Represents positive outcomes, confirmations, or constructive actions. - `danger` Signals destructive or irreversible actions that need extra attention and confirmation. - `scheduled` Task has a scheduled future execution at a specific time. - `queued` Task is waiting in line to begin after other tasks complete. - `pending` Task is awaiting approval, user input, or external conditions before proceeding. - `starting` Task is initializing and preparing to begin active execution. - `running` Task is actively executing and making progress. - `restarting` Task restarts after an interruption or reset. - `stopping` Task is gracefully shutting down and completing cleanup operations. - `finished` Task has completed successfully with the expected outcome. - `failed` Task encountered an error and did not complete as intended. - `unknown` Task status remains unknown or unavailable. - `ignored` Task was intentionally skipped or excluded from execution. |
| color | `'red-cardinal' \| 'gray-slate' \| 'gray-denim' \| 'blue-indigo' \| 'blue-cobalt' \| 'blue-sky' \| 'teal-cyan' \| 'green-mint' \| 'teal-seafoam' \| 'green-grass' \| 'yellow-amber' \| 'orange-pumpkin' \| 'red-tomato' \| 'pink-magenta' \| 'purple-plum' \| 'purple-violet' \| 'purple-lavender' \| 'pink-rose' \| 'green-jade' \| 'lime-pear' \| 'yellow-nova' \| 'brand-green'` | Defines a base color from the theme color palette |
| container | `'flat' \| "default"` | Demonstrates different container styles to accommodate visual weight and context. - `flat` Element has white space bounds but reduced visual container. |
| prominence | `'emphasis' \| "default"` | Controls the visual prominence to establish hierarchy and guide user attention. - `emphasis` Increases visual weight to draw attention and highlight important elements. |
| i18n | | Enables updating internal string values for internationalization. |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --background | `string` | [MDN](https://mdn.dev/CSS/background) |
| --color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |
| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |
| --icon-color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |
| --border | `string` | [MDN](https://mdn.dev/CSS/border) |
| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |
| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |
| --text-transform | `string` | [MDN](https://mdn.dev/CSS/text-transform) |
| --width | `string` | [MDN](https://mdn.dev/CSS/width) |
| --height | `string` | [MDN](https://mdn.dev/CSS/height) |
## nve-breadcrumb
Breadcrumb is a component that can help users establish their location while navigating a website with complex URLs and navigation paths.
### Example
```html
Item 1
Item 2
Item 3
You Are Here
```
### Import
```javascript
import '@nvidia-elements/core/breadcrumb/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | default slot for `nve-button` and anchor elements |
### CSS Properties
| name | value | description |
| ---- | ----- | ----------- |
| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |
| --height | `string` | [MDN](https://mdn.dev/CSS/height) |
| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |
| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |
| --color | `string` | [MDN](https://mdn.dev/CSS/color) |
| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |
| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |
| --width | `string` | [MDN](https://mdn.dev/CSS/width) |
| --icon-width | `string` | [MDN](https://mdn.dev/CSS/width) |
| --icon-height | `string` | [MDN](https://mdn.dev/CSS/height) |
| --text-decoration | `string` | [MDN](https://mdn.dev/CSS/text-decoration) |
| --breadcrumb-height | `string` | deprecated |
| --item-text-size | `string` | deprecated |
| --item-color | `string` | deprecated |
| --item-active-color | `string` | deprecated |
| --item-active-font-weight | `string` | deprecated |
## nve-button
A button is a widget that enables users to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
### Example
```html
standard
```
### Import
```javascript
import '@nvidia-elements/core/button/define.js';
```
### Slots
| name | value | description |
| ---- | ----- | ----------- |
| (default) | `string` | slot for button text content or icon, icon placement depends on whether `icon` appears before or after text content. |
### Properties / Attributes
| property (attribute) | value | description |
| -------------------- | ----- | ----------- |
| container | `'flat' \| 'inline' \| "default"` | Demonstrates different container styles to accommodate visual weight and context. - `flat` Element has white space bounds but reduced visual container. - `inline` Element container reduces to fit within inline content such as a block of text. |
| size | `'sm' \| 'md' \| 'lg' \| "default"` | Controls the visual scale of an element to match its importance and available space. - `sm` Compact size for dense layouts or secondary elements with less visual prominence. - `md` Standard size that works well in most contexts and provides balanced visibility. - `lg` Larger size for emphasizing important elements or improving touch targets in spacious layouts. |
| interaction | `'emphasis' \| 'destructive'` | The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors. - `emphasis` Shows the interaction targets emphasis or highlighting primary actions. - `destructive` Shows the interaction targets destructive actions such as deleting or removing. |
| pressed | `boolean` | Indicates the current state of a toggle button that switches on or off. [MDN](https://mdn.dev/ARIA/Attributes/aria-pressed) - `true` The button is in the pressed (on) state and the associated action or setting is active. - `false` The button is in the unpressed (off) state and the associated action or setting is inactive. |
| expanded | `boolean` | Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://mdn.dev/ARIA/Attributes/aria-expanded) - `true` The associated content expands and becomes visible to the user. - `false` The associated content collapses and hides from the user. |
| readOnly (readonly) | `boolean` | Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://mdn.dev/HTML/Attributes/readonly) - `true` The element has a readonly state: the user cannot change its value, but can still focus and copy it. - `false` The element allows editing and the user can change its value through interaction. |
| form | `HTMLFormElement \| null \| string` | Like input form, sets a button to submit a form outside its parent form. Returns a reference to the form element if available. https://mdn.dev/ElementInternals/form |
| name | `string` | The name of the button, submitted as a pair with the button's value as part of the form data, when that button submits the form. https://mdn.dev/HTML/Element/button#attr-name |
| value | `string` | Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://mdn.dev/HTML/Element/input#value) |
| type | `'button' \| 'submit' \| 'reset'` | Defines the button behavior when associated within an