Getting started
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.
-
Install the package (React 18+ is a peer dependency).
Terminal window npm install tenet-ui react react-dom -
Import the stylesheet once, at your app root, before any component renders.
// main.tsx / app rootimport 'tenet-ui/styles.css'; -
Pick a color mode by setting
data-color-modeon<html>(or<body>). Light is the default; the themed tokens (fgColor,bgColor,borderColor) re-resolve off this attribute, so theming needs no component changes.<html data-color-mode="dark">…</html>Put it on the document root, not a wrapper:
Menu,Select,Popover,DatePicker,DialogandToastportal todocument.bodyand read the theme from there. -
Render a first component.
import 'tenet-ui/styles.css';import { Button, FormControl, TextInput, Stack } from 'tenet-ui';export function Example() {return (<Stack gap="normal"><FormControl required><FormControl.Label>Email</FormControl.Label><TextInput type="email" block /></FormControl><Button variant="primary">Save changes</Button></Stack>);}
What you get
Section titled “What you get”| Concern | Use | Never |
|---|---|---|
| Colors, spacing, type, radii, shadows | the CSS variables on the Tokens page (var(--bgColor-accent-emphasis), var(--space-3)) | raw hex / px values |
| Actions, fields, navigation, feedback, data | the components (Button, TextInput, Tabs, Banner, Table…) | raw <button>, <input>, <table> where a component exists |
| Headings and body copy | Heading and Text | raw <h1>–<h6> with ad-hoc styles |
| Layout | Stack and Grid | one-off flex/grid CSS |
| Icons | tenet-ui/icons via leadingIcon / trailingIcon / IconButton | inline SVG copied from elsewhere |
Exports
Section titled “Exports”| Entry | What |
|---|---|
tenet-ui | every component and its types |
tenet-ui/styles.css | the single stylesheet: tokens (light + dark) + component CSS |
tenet-ui/icons | the icon components |
tenet-ui/tokens.css, tenet-ui/tokens.json | tokens only, for tooling |
tenet-ui/generated/components.json | the type-derived component catalog, for tooling |
Where to go next
Section titled “Where to go next”- Components: status, props, guidelines and live examples for each component; every example links to the full matrix in Storybook.
- Foundations & patterns: the system-level decisions every component inherits.
- Changelog: releases and the deprecation registry.
- GitHub repository: source, issues and the build scripts that generate this site.