This is the full developer documentation for Tenet UI (tenet-ui)
# Tenet UI
> Semantic design tokens, accessible React components and an icon set, shipped as one npm package with one stylesheet. Every page of this site is generated from the tenet-ui repository at build time.
Components
41 components, each documented from its TypeScript types, its usage guidelines and its Storybook stories, rendered live. [Browse components](/components/)
Tokens
104 design tokens as CSS variables with light and dark values. Components only ever reference the semantic layer. [See the tokens](/tokens/)
Foundations
Color, typography, layout, forms, feedback, data display, iconography, accessibility and content guidance. [Read the foundations](/foundations/)
For agents
This site publishes [`llms.txt`](/llms.txt), [`llms-full.txt`](/llms-full.txt) and [`llms-small.txt`](/llms-small.txt). Every page carries a `Last updated` date and a `content-hash` meta tag.
tenet-ui\@0.4.0
# Getting started
> Install tenet-ui, import the single stylesheet, set data-color-mode, and render a first component. This is the runtime contract.
`tenet-ui` is a React design system: design tokens as CSS custom properties, 41 accessible components, and an icon set. It ships as one npm package with **one stylesheet**. This page is the runtime contract: follow it and every component renders styled and themed; skip step 2 and nothing does.
1. **Install the package** (React 18+ is a peer dependency).
```bash
npm install tenet-ui react react-dom
```
2. **Import the stylesheet once**, at your app root, before any component renders.
```tsx
// main.tsx / app root
import 'tenet-ui/styles.css';
```
Without this import, nothing renders styled
Every component’s CSS references design tokens as `var(--token)`. The tokens are *defined* in `tenet-ui/styles.css`. If the stylesheet is not loaded, every `var()` is undefined and the components fall back to browser defaults: unstyled buttons, invisible borders, no theming. A page that “looks almost right” while hardcoding hex colors and pixel values is not using tenet-ui; it is imitating it.
3. **Pick a color mode** by setting `data-color-mode` on `` (or ``). Light is the default; the themed tokens (`fgColor`, `bgColor`, `borderColor`) re-resolve off this attribute, so theming needs no component changes.
```html
…
```
Put it on the document root, not a wrapper: `Menu`, `Select`, `Popover`, `DatePicker`, `Dialog` and `Toast` portal to `document.body` and read the theme from there.
4. **Render a first component.**
```tsx
import 'tenet-ui/styles.css';
import { Button, FormControl, TextInput, Stack } from 'tenet-ui';
export function Example() {
return (
Email
);
}
```
## What you get
[Section titled “What you get”](#what-you-get)
| Concern | Use | Never |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| Colors, spacing, type, radii, shadows | the CSS variables on the [Tokens](/tokens/) page (`var(--bgColor-accent-emphasis)`, `var(--space-3)`) | raw hex / px values |
| Actions, fields, navigation, feedback, data | the [components](/components/) (`Button`, `TextInput`, `Tabs`, `Banner`, `Table`…) | raw `