Installation
How to install Tessina UI in your project
Installation
Install Tessina UI and its peer dependencies in your React project.
Using pnpm
pnpm add @tessinaui/ui react react-domUsing npm
npm install @tessinaui/ui react react-domUsing yarn
yarn add @tessinaui/ui react react-domSetup Tailwind CSS
Tessina UI is built with Tailwind CSS v4. Install Tailwind and the integration for your bundler.
Install Tailwind CSS
For Next.js and other PostCSS setups:
pnpm add -D tailwindcss @tailwindcss/postcssexport default {
plugins: {
"@tailwindcss/postcss": {},
},
};For Vite, install @tailwindcss/vite instead and add tailwindcss() to your Vite plugins.
Import the styles
Add three lines to your global CSS file:
@import "tailwindcss";
@import "@tessinaui/ui/styles.css";
@source "../node_modules/@tessinaui/ui/dist";@tessinaui/ui/styles.cssis a Tailwind source stylesheet. It carries the design tokens for light and dark, the radius scale, and the--color-*theme map that utilities likebg-primaryandtext-errorresolve against. You don't need atailwind.config.ts.@sourcetells Tailwind to scan the components for the classes they use. Tailwind skipsnode_modulesby default, so without it the components render unstyled. The path is relative to the CSS file.
Dark mode
Dark mode is class-based. Add the dark class to <html>:
<html lang="en" className="dark">Install from the registry instead
Every component is also a registry item, which copies its source into your
project rather than adding a package. The stylesheet ships the same way, as the
base item: the tokens, theme map, variants and utilities of styles.css,
merged into your own global CSS.
Register the registry once:
{
"registries": {
"@tessina": "https://tessinaui.com/r/{name}.json"
}
}Then install base with your first component:
npx shadcn@latest add @tessina/base @tessina/button- Every component lists
baseas a dependency, so each later install keeps the stylesheet up to date:npx shadcn@latest add @tessina/cardis enough. - Name
basein that first command whenever the app's global CSS already maps colours such as--color-primaryto variables of its own, as a project set up with the CLI'sinitdoes. The CLI replaces an existing map only for an item named on the command line, never for a dependency. - A theme installs the same way, and adding more components afterwards leaves it in place.
You're Ready!
You've successfully installed Tessina UI. Now you can start using the components in your project.
Check out the Usage guide to learn how to use components.