# Vesper > Vesper is Tenstorrent's design system for the web: a React component library built on a shared set of design tokens, with light and dark themes, an icon set, and first-class Tailwind support. The full text of every Vesper documentation page. For an index of links instead, see https://vesper.tenstorrent.com/llms.txt --- Source: https://vesper.tenstorrent.com/getting-started.md # Getting Started ## Install You can install the `@tenstorrent/vesper` package from the npm registry using your package manager of choice: ```sh yarn add @tenstorrent/vesper npm install @tenstorrent/vesper pnpm add @tenstorrent/vesper ``` Since `@tenstorrent/vesper` is a React package, you will also need to have `react@^19.0.0` and `react-dom@^19.0.0` installed, as they are peer dependencies. ```sh # install peer deps (skip if these are already installed) npm install --save-peer react@^19.0.0 react-dom@^19.0.0 ``` ### Import styles Prior to using any components, you will need to import the library styles from `@tenstorrent/vesper/styles.css` somewhere at the top-level of your application. For example, in a `Next.js` application, you may import them in your app's root `layout.tsx` file: ```tsx import type { ReactNode } from "react"; import "@tenstorrent/vesper/styles.css"; export default function RootLayout({ children }: { children: ReactNode }) { return (
{children} ); } ``` This makes the Vesper library's component styles and css tokens globally available in your application. For more information on usage of Vesper's css tokens, see [CSS token usage](#css-token-usage). If you are using [Tailwind](https://tailwindcss.com) to style your app, we supply a Tailwind-specific file you can import instead. This has two advantages: 1. Vesper's component styles get injected into Tailwind's `components` layer, which lets Tailwind utility classes override vesper css classes. 2. Vesper's css tokens get injected into the Tailwind `@theme` so you can use them in Tailwind utility classes, like `bg-vesper-purple-300`, for example. You should import Vesper's Tailwind styles **after** importing `tailwindcss` in your css file, like so: ```css @import "tailwindcss"; @import "@tenstorrent/vesper/tailwind.css"; ``` If you import Vesper's Tailwind styles before importing `tailwindcss`, the order of Tailwind's internal css layers will get mangled. ### Fonts Vesper components are styled using two fonts, `Inter Tight` and `IBM Plex Mono`. The fonts themselves are **not** bundled with the package, only the font stacks are. If you want Vesper's components to render in `Inter Tight` and `IBM Plex Mono`, you need to load those fonts in your app (for example with `next/font/google` if developing a `Next.js` application, a `@font-face` rule, or a `` to Google Fonts). If they aren't loaded, the fallbacks in each stack are used. The easiest way to do this is to embed the corresponding Google Fonts code into the `` of your html: ```html ``` --- Source: https://vesper.tenstorrent.com/tokens.md # CSS Tokens Vesper is built on top of a set of design tokens corresponding to color, spacing, radius, leading, tracking, shadow, stroke, and background. These tokens are exposed in your app as CSS variables when you [import the component styles](https://vesper.tenstorrent.com/getting-started.md#import-styles), and can also be used in Tailwind utilities. ## Colors Color tokens are split into _primitive_ and _semantic_ tokens. **Primitive** tokens are the raw palette values from our design system. **Semantic** tokens are aliases of primitive tokens intended to be more ergonomic for applied use (these will be familiar to you if you've used a library like Tailwind). For example, the semantic token `--vesper-background-primary` aliases the primitive `--vesper-stone-0` color token value. We prefer using semantic tokens wherever possible, since they automatically resolve to the correct primitive for the active theme. ### Primitive color tokens | Preview | CSS variable | Light mode value | Dark mode value | | ---------------------------------------- | ----------------------------- | --------------------------- | ---------------------------- | |;
```
## Leading
Leading (line height) tokens are percentage-based, so they scale with the element's font size.
| CSS variable | Value |
| -------------------------- | ------ |
| `--vesper-leading-none` | `100%` |
| `--vesper-leading-tight` | `110%` |
| `--vesper-leading-snug` | `120%` |
| `--vesper-leading-normal` | `140%` |
| `--vesper-leading-relaxed` | `150%` |
| `--vesper-leading-loose` | `175%` |
### Tailwind leading classes
Leading tokens are registered in Tailwind's `--leading-*` namespace, so they are available as `line-height` utilities:
```tsx
;
;
```
## Tracking
Tracking (letter spacing) tokens are also relative to the element's font size. The values below are expressed in `em`, so they scale with the font size — for example, `--vesper-tracking-tight` resolves to `-0.25px` at a `16px` font size.
| CSS variable | Value | Equivalent at `16px` font size |
| ---------------------------- | ------------- | ------------------------------ |
| `--vesper-tracking-tightest` | `-0.046875em` | `-0.75px` |
| `--vesper-tracking-tighter` | `-0.03125em` | `-0.5px` |
| `--vesper-tracking-tight` | `-0.015625em` | `-0.25px` |
| `--vesper-tracking-normal` | `0em` | `0px` |
| `--vesper-tracking-wide` | `0.015625em` | `0.25px` |
| `--vesper-tracking-wider` | `0.03125em` | `0.5px` |
| `--vesper-tracking-widest` | `0.046875em` | `0.75px` |
### Tailwind tracking classes
Tracking tokens are registered in Tailwind's `--tracking-*` namespace, so they are available as `letter-spacing` utilities:
```tsx
;
;
```
## Radius
| CSS variable | Value | Equivalent at `16px` root font size |
| ---------------------- | ---------- | ----------------------------------- |
| `--vesper-radius-half` | `0.125rem` | `2px` |
| `--vesper-radius-1` | `0.25rem` | `4px` |
| `--vesper-radius-2` | `0.5rem` | `8px` |
| `--vesper-radius-3` | `0.75rem` | `12px` |
| `--vesper-radius-4` | `1rem` | `16px` |
| `--vesper-radius-6` | `1.5rem` | `24px` |
| `--vesper-radius-7` | `1.75rem` | `28px` |
### Tailwind radius classes
Radius tokens are registered in Tailwind's `--radius-*` namespace, so they work with every `border-radius` utility, including the side- and corner-specific ones:
```tsx
;
;
;
```
## Shadows
| CSS variable | Value |
| ---------------------------- | -------------------------------------------------------------- |
| `--vesper-shadow-100` | `0 0.125rem 0.375rem 0.0625rem rgba(9, 34, 33, 0.1)` |
| `--vesper-shadow-200` | `0 0.25rem 0.75rem 0 rgba(9, 34, 33, 0.1)` |
| `--vesper-shadow-300` | `0 0.75rem 2rem 0 rgba(9, 34, 33, 0.15)` |
| `--vesper-shadow-400` | `0 1.5rem 4rem 0 rgba(9, 34, 33, 0.2)` |
| `--vesper-shadow-inset-100` | `0 0.125rem 0.375rem 0 var(--vesper-alpha-contrast-100) inset` |
| `--vesper-shadow-inset-200` | `0 0.125rem 0.75rem 0 var(--vesper-tint-contrast-200) inset` |
| `--vesper-shadow-focus-ring` | `0 0 0 0.1875rem var(--vesper-border-focus)` |
### Tailwind shadow classes
Shadow tokens are registered in Tailwind's `--shadow-*` namespace, so they are available as `box-shadow` utilities. Note that the inset tokens already include the `inset` keyword in their value, so they are also applied with `shadow-*` (not `inset-shadow-*`):
```tsx
;
;
;
```
## Spacing
| CSS variable | Value | Equivalent at `16px` root font size |
| ------------------------ | ----------- | ----------------------------------- |
| `--vesper-spacing-0` | `0rem` | `0px` |
| `--vesper-spacing-micro` | `0.0625rem` | `1px` |
| `--vesper-spacing-half` | `0.125rem` | `2px` |
| `--vesper-spacing-1` | `0.25rem` | `4px` |
| `--vesper-spacing-2` | `0.5rem` | `8px` |
| `--vesper-spacing-3` | `0.75rem` | `12px` |
| `--vesper-spacing-4` | `1rem` | `16px` |
| `--vesper-spacing-5` | `1.25rem` | `20px` |
| `--vesper-spacing-6` | `1.5rem` | `24px` |
| `--vesper-spacing-8` | `2rem` | `32px` |
| `--vesper-spacing-10` | `2.5rem` | `40px` |
| `--vesper-spacing-12` | `3rem` | `48px` |
| `--vesper-spacing-14` | `3.5rem` | `56px` |
| `--vesper-spacing-16` | `4rem` | `64px` |
| `--vesper-spacing-20` | `5rem` | `80px` |
| `--vesper-spacing-24` | `6rem` | `96px` |
| `--vesper-spacing-28` | `7rem` | `112px` |
| `--vesper-spacing-32` | `8rem` | `128px` |
| `--vesper-spacing-40` | `10rem` | `160px` |
### Tailwind spacing classes
Spacing tokens are registered in Tailwind's `--spacing-*` namespace as `--spacing-vesper-*`, so they work with every spacing-based utility — padding, margin, width, height, gap, inset, translate, and so on:
```tsx
;
;
;
```
## Animations
| CSS variable | Value |
| -------------------------------------- | ------ |
| `--vesper-transition-duration-fast` | `0.2s` |
| `--vesper-transition-duration-default` | `0.3s` |
| `--vesper-transition-duration-slow` | `0.6s` |
Use them anywhere a duration is expected so that your app's motion stays in step with Vesper's components:
```css
transition: background-color var(--vesper-transition-duration-fast) ease-in-out;
```
### Tailwind animation classes
Animation tokens are registered in Tailwind's `--transition-duration-*` namespace, so they are available through the `duration-*` utilities:
```tsx
;
;
```
## Backgrounds
Background tokens provide Vesper's dot pattern as ready-to-use `background` shorthand values.
| CSS variable | Light mode value | Dark mode value |
| ----------------------------------- | -------------------------------------------- | ------------------------------------------------ |
| `--vesper-bg-dot-pattern-primary` | `url(...) repeat top #f8fcfb` | `url(...) repeat top #050f0e` |
| `--vesper-bg-dot-pattern-secondary` | `url(...) repeat top #eef6f6` | `url(...) repeat top #0b1817` |
| `--vesper-bg-dot-pattern-tertiary` | `url(...) repeat top #e8f2f1` | `url(...) repeat top #13201e` |
| `--vesper-bg-dot-pattern-inverse` | `url(...) repeat top rgba(0, 15, 15, 0.973)` | `url(...) repeat top rgba(245, 255, 253, 0.937)` |
Since the dot pattern tokens are `background` shorthand values, assign them to the `background` property rather than `background-image` or `background-color`:
```css
background: var(--vesper-bg-dot-pattern-secondary);
```
### Tailwind background classes
Background tokens are exposed as custom Tailwind utilities rather than theme values:
```tsx
;
;
;
;
```
Both the default and inverse dot patterns also accept any Vesper color token as a background color, using the token name without the `vesper-` prefix:
```tsx
;
;
;
```
## Strokes
Stroke tokens define the border and outline widths used throughout Vesper.
| CSS variable | Value | Equivalent at `16px` font size |
| ------------------------ | ----------- | ------------------------------ |
| `--vesper-stroke-base` | `0.0625rem` | `1px` |
| `--vesper-stroke-strong` | `0.125rem` | `2px` |
```css
border: var(--vesper-stroke-base) solid var(--vesper-border-secondary);
outline: var(--vesper-stroke-strong) solid var(--vesper-border-focus);
```
### Tailwind stroke classes
Stroke tokens are registered in Tailwind's `--outline-width-*` and `--border-width-*` namespaces, so they are available as `outline-width` and `border-width` utilities:
```tsx
;
;
```
---
Source: https://vesper.tenstorrent.com/agents.md
# Using Vesper with Agents
## For Humans
Vesper's documentation was created to be easily intuited by agents. You can simply point your agent at `vesper.tenstorrent.com` and it should be able to handle the rest:
```
Check out the Vesper docs here: vesper.tenstorrent.com
```
Every page of this documentation is also published as plain Markdown, so agents can access Vesper's documentation directly in agent-friendly format by:
1. Appending `.md` to any documentation route URL
2. Going to `/llms.txt` for an overview of Vesper, its APIs, and other agent resources
3. Going to `/llms-full.txt` for everything in one network call
> [!TIP]
>
> You can also use the **copy as markdown** and **copy as prompt** buttons at the bottom of each page to paste into an agent chat directly.
## For Agents
### Start here
Two entry points cover the whole documentation set:
- [llms.txt](https://vesper.tenstorrent.com/llms.txt): an index of every page, linking to its Markdown source. Start here and fetch only the pages you need.
- [llms-full.txt](https://vesper.tenstorrent.com/llms-full.txt): the full text of every page, inlined in a single response.
### Markdown for any page
Append `.md` to any documentation URL to get the Markdown source of that page. These responses are served as plain text, so an agent can fetch and read them as they are. This works for every page listed in `llms.txt`, including this one.
---
Source: https://vesper.tenstorrent.com/components/accordion.md
# Accordion
A collapsible content panel that toggles between expanded and collapsed states. Useful for organizing long-form content into manageable sections.
```tsx demo
import { Accordion } from "@tenstorrent/vesper/accordion";
export default function AccordionDemo() {
return (
v2.0.