Skip to content

Installation

⋯

Nesra UI uses React 18.3 or 19, Tailwind CSS v4, and ESM. The application controls Tailwind, Preflight, and font loading.

@nesra/ui is publicly downloadable but licensed only for authorized Nesra projects. Downloading it does not grant external use or redistribution rights. Authorized users can install it with a package manager:

Terminal window
pnpm add @nesra/ui
Terminal window
npm install @nesra/ui
Terminal window
yarn add @nesra/ui

The application must provide react and react-dom. Most React applications already do. lucide-react is a regular dependency of @nesra/ui for internal component icons, so it is installed with the package rather than listed as a peer dependency.

Both the package root and component subpaths are public imports:

import { Button, Input, Table, Text, Tooltip, TooltipProvider } from "@nesra/ui";
import { Button } from "@nesra/ui/button";
import { Input } from "@nesra/ui/input";
import { Table } from "@nesra/ui/table";
import { Text } from "@nesra/ui/text";
import { Tooltip, TooltipProvider } from "@nesra/ui/tooltip";

The component pages list the supported granular imports for each implemented component. Pages marked as upcoming do not yet have a supported import. Do not import from the package’s internal dist paths.

Set up Tailwind CSS v4 in the application. In its global stylesheet, for example src/app.css, add:

@source "../node_modules/@nesra/ui/dist/**/*.js";
@import "@nesra/ui/styles";
@import "tailwindcss";

Tailwind does not scan node_modules automatically. @source makes the classes used by Nesra UI available in the generated CSS. Its path is relative to the stylesheet. For src/styles/app.css, use ../../node_modules/@nesra/ui/dist/**/*.js.

Keep @nesra/ui/styles before tailwindcss so Tailwind registers the theme bindings. Import the global stylesheet once from the application’s entry point. Nesra UI does not provide a standalone, precompiled stylesheet for applications without Tailwind.

Tooltip popups are portaled to document.body. A sticky header or other app content with a positive z-index can otherwise appear above a popup. Add isolation: isolate to the element wrapping the app’s content, leaving the portal outside that element:

/* The element wrapping your app, such as #root or #app. */
#root {
isolation: isolate;
}

With Tailwind, add className="isolate" to that wrapper instead. Do not apply isolation to body, which also contains the portal. See Base UI’s portal setup.

Nesra UI does not fetch or bundle fonts. Load Inter at weights 400, 500, 600, and 700 to reproduce the approved typography. Otherwise, type roles fall back to the platform UI font stack. See Typography for the roles and metrics.

import { Button, Text } from "@nesra/ui";
import "./app.css";
export function SaveAction() {
return (
<div>
<Text as="h1" variant="heading1">
Settings
</Text>
<Button>Save changes</Button>
</div>
);
}

See Button, Input, Text, and Tooltip for rendered states and API details. Colors and Layout list the available semantic utilities.

Use llms.txt to find Markdown versions of the implemented component and foundation pages. Each page is also available at its .md path, such as /components/button.md. llms-full.txt contains the available pages in one file. Upcoming component pages are omitted from these indexes because they do not have supported imports yet.

When the documentation and an installed package version differ, check that version’s public exports and types before using an import or prop. The documentation may describe a newer package version. For component selection and migration workflows, install the Nesra UI agent skill.

cn is exported from the package root. It merges conditional classes and conflicting Tailwind utilities:

import { cn } from "@nesra/ui";
const className = cn("px-2 py-1", "px-4", { "text-red-500": true });

Button’s startIcon and endIcon accept any React node, so application icons can come from any library. If your application imports Lucide icons, add lucide-react as its own dependency and import those icons directly. Nesra UI does not re-export icons.