VDS

Installation

Install VDS packages in React, Astro, or any HTML project.

Requirements

  • Tailwind CSS v4
  • Node.js 18 or later

VDS is shipped as a matched set of packages. Install @vds-testing/core, @vds-testing/react, @vds-testing/elements, and @vds-testing/styles together — they share one version number.

The packages are published publicly on npm under the @vds-testing scope. In this repo they are consumed via the workspace (workspace:*).

Packages

Package Role
@vds-testing/styles Design tokens, Tailwind theme, and shared CSS
@vds-testing/core Framework-agnostic class generators and vanilla behavior
@vds-testing/react Thin React wrappers over real HTML elements
@vds-testing/elements Light-DOM Web Components for Astro, Vue, and plain HTML

React (Next.js, Vite, Remix)

pnpm install @vds-testing/react

@vds-testing/core and @vds-testing/styles are installed with it. In your CSS entry (for Next.js, app/globals.css):

@import "tailwindcss";
@import "@vds-testing/react/styles.css";

@vds-testing/react/styles.css loads the VDS tokens and points Tailwind at the component class names so they are generated. Your app must compile Tailwind v4.

import { Button } from "@vds-testing/react";

<Button variant="default">Join now</Button>

The bundle is marked "use client", so components can be used directly in Next.js App Router pages.

Web Components (Astro, Vue, plain HTML)

pnpm install @vds-testing/elements
@import "tailwindcss";
@import "@vds-testing/elements/styles.css";
<script type="module">
  import "@vds-testing/elements";
</script>

<vds-button variant="default">Join now</vds-button>

Custom elements render into light DOM (not Shadow DOM) so the shared Tailwind stylesheet can style them.

Styles only

pnpm install @vds-testing/styles
@import "tailwindcss";
@import "@vds-testing/styles";

Use this when you want tokens and focus utilities without components. Pair with @vds-testing/core class helpers if you prefer to write your own markup:

pnpm install @vds-testing/core @vds-testing/styles
import { buttonClasses } from "@vds-testing/core";

const className = buttonClasses({ variant: "secondary", size: "lg" });

Tailwind needs to scan @vds-testing/core to generate those classes. Add a @source line relative to your CSS file:

@import "tailwindcss";
@import "@vds-testing/styles";
@source "../node_modules/@vds-testing/core/src";

Using with v0

v0 generates Next.js apps with Tailwind CSS v4, so the React setup above applies. Give v0 these instructions in your prompt:

Install the npm package @vds-testing/react.
In app/globals.css, add @import "@vds-testing/react/styles.css"; right after @import "tailwindcss";.
Import components from "@vds-testing/react", e.g. import { Button, DatePicker } from "@vds-testing/react".