# Zenos documentation > The complete text of the published Zenos docs, including code samples. Index: https://zenos-ui.pages.dev/llms.txt # Zenos Install accessible React components and copy editable recipes into your app. The published documentation starts with installation, foundations, components, layout, hooks, and recipes. Coding agents should read Working with AI, then use the installed `zenos component` and `zenos docs` commands for the version an application depends on. Source: https://zenos-ui.pages.dev/ --- # Introduction Meet Zenos, a React UI kit for building dashboards, forms, and product interfaces. Zenos UI and CLI are public npm packages under the `@zentara-co` scope. Installation does not require repository access or a token. Zenos gives you ready-made React components for product interfaces: buttons, forms, dialogs, navigation, tables, and responsive layouts. They share the same styles and interaction patterns, so you can build a consistent app without starting every control from scratch. It is a good fit for dashboards, admin tools, and internal applications. You need a React 19 project to use it. What goes into your app: Start with the UI package. Add recipes when you need them. 1. **Zenos UI.** `Buttons, forms, dialogs, layouts, and styles`. Import ready-made components from @zentara-co/zenos-ui. 2. **Optional recipes.** `Date pickers, charts, file uploads, and more`. The CLI copies files into your app and installs their extra dependencies. 3. **Your application.** `Pages, data, validation, and save actions`. Combine the pieces and connect them to your product's behavior. ## Start with one package Install `@zentara-co/zenos-ui` and load its stylesheet. Components, layout helpers, and hooks all come from the same import: ```tsx import { Button, Stack, Text } from "@zentara-co/zenos-ui"; export function Welcome() { return ( Your next project ); } ``` [Follow Installation](/getting-started/installation/) to install the packages, add the styles, and render your first button. Already installed? [Build the Quick Start form](/getting-started/quick-start/). ## What you can build - **Forms and settings:** combine [Field](/components/field/), [Input](/components/input/), [Select](/components/select/), and [Button](/components/button/). - **Application pages:** arrange content with [Stack](/layout/stack/), [Grid](/layout/grid/), and [AppShell](/layout/app-shell/). - **Interactive flows:** use [Dialog](/components/dialog/), [DropdownMenu](/components/dropdown-menu/), and [Toast](/components/toast/). - **Specialized features:** add a [Calendar](/recipes/calendar/), [Chart](/recipes/chart/), or [Data Table](/recipes/data-table/) recipe when you need one. A **recipe** is editable source copied into your app by the [CLI](/getting-started/cli/). It installs the extra library that feature needs. Regular components come from the UI package; recipes come from your local files after installation. ## Make it fit your app Use component props for common choices, such as `variant="primary"` or `size="sm"`. Use layout props for spacing and alignment. For your brand's colors, fonts, and corners, change the [theme tokens](/foundations/tokens/), which are named CSS variables shared by the components. You can also use `className`, `style`, and native HTML attributes for local changes. Zenos includes compiled CSS, so Tailwind is optional in your app. ## Your app still owns the behavior Zenos supplies controls, layout, styling, and keyboard and focus behavior for its interactive components. Your app supplies the data and decides what happens when someone saves a form or opens a page. For example, `Field` connects a label and error message to an `Input`. You decide which values are valid and how to save them. Provide meaningful labels and test the complete flow with a keyboard.
Useful API conventions as you learn - `value`, `defaultValue`, and `onValueChange` manage value state where supported. - `open`, `defaultOpen`, and `onOpenChange` manage dialogs and other overlays. - `as` changes the HTML element rendered by a layout component. - `render` composes a control with a Base UI-backed component, such as `Field.Control`. - `disabled`, `required`, and `invalid` describe control state where supported. - `data-slot` identifies rendered parts for inspection. Use `defaultValue` when a component can manage its own value. Use `value` and `onValueChange` when your app needs to manage it. Each component's documentation lists the props it supports. Complex interactions build on Base UI and native HTML behavior. Import Zenos components through `@zentara-co/zenos-ui`; the package's internal files are not a supported API.
## Choose your next step 1. **New project:** [Installation](/getting-started/installation/) gets your first component on screen. 2. **Ready to build:** [Quick Start](/getting-started/quick-start/) gives you a form to copy and adapt. 3. **Using an AI assistant:** [Working with AI](/getting-started/working-with-ai/) sets up the instructions it needs. For deeper configuration, see [Project Setup](/getting-started/project-setup/) and [Foundations](/foundations/). Source: https://zenos-ui.pages.dev/getting-started/introduction/ --- # Installation Create an app from the Zenos starter template, or install Zenos in an existing React app. Create a new app from the Zenos starter template, or add Zenos to an existing React 19 app using the manual installation steps below. ## Create an app from the starter template Run the starter executable with Bun or npm: ```sh title="Bun" bunx @zentara-co/create-zenos-app@latest ``` ```sh title="npm" npx @zentara-co/create-zenos-app@latest ``` For an existing app, follow the installation steps below. From install to your first button: Check the requirements, install the tools, then check your React app. 1. **Check your setup.** `React 19 + an ESM bundler`. Install from public npm without a token or repository access. 2. **Install the UI and CLI.** `@zentara-co/zenos-ui + @zentara-co/zenos-cli`. Add the UI to dependencies and the CLI to development dependencies. 3. **Style and check your app.** `@import → index.css → your app`. Import Zenos CSS in index.css, load that file once, then check a button and its keyboard focus. ## Before you begin Zenos UI and CLI are public npm packages under the `@zentara-co` scope. Installation does not require repository access or a token. You need React and React DOM `19.x`, plus a framework or bundler that supports ESM and CSS imports. Vite, Next.js, Astro with React, React Router, and TanStack Start are supported setups. TypeScript `5.x` is recommended. ## 1. Install the UI Install directly from the public npm registry. No login or token is needed. Run this in the folder containing your app's `package.json`. Choose the package manager your project uses: ```bash pnpm add @zentara-co/zenos-ui npm install @zentara-co/zenos-ui yarn add @zentara-co/zenos-ui bun add @zentara-co/zenos-ui ``` In a monorepo, install it in the package that renders React. Zenos includes its component dependencies; you do not need to install Base UI separately. Run the CLI directly with `bunx`, `npx`, `pnpm dlx`, or `yarn dlx`, without installing it in your project (Node.js 20 or newer is required): ```bash pnpm dlx @zentara-co/zenos-cli --help npx @zentara-co/zenos-cli --help yarn dlx @zentara-co/zenos-cli --help bunx @zentara-co/zenos-cli --help ``` The CLI provides component lookups, AI instructions, and recipe installation. See the [CLI guide](/getting-started/cli/) for commands.
Migrating from GitHub Packages? If you previously installed Zenos from GitHub Packages, remove its `@zentara-co` registry mapping and token line from your project's and user-level `.npmrc`. If you use a custom default registry, add this scope mapping: ```ini title=".npmrc" @zentara-co:registry=https://registry.npmjs.org ``` Update existing lockfile entries that still resolve Zenos packages from GitHub Packages.
## 2. Load the styles Put Zenos stylesheet imports in your application's global `index.css`. Import that local CSS file once from your framework entry or root layout. Keep package CSS imports out of component and `.tsx` files. For a Tailwind CSS v4 application, put these imports at the top of `index.css`, before your own rules: ```css title="src/index.css" @import "tailwindcss"; @import "@zentara-co/zenos-ui/tailwind.css"; ``` This CSS entrypoint exposes Zenos theme utilities and custom variants to Tailwind CSS IntelliSense. The compiled `styles.css` entrypoint supplies runtime styles but does not register Zenos' Tailwind design metadata with the editor. Use `tailwind.css` for Tailwind projects, and load it through CSS rather than importing it directly from JavaScript or TypeScript. Tailwind must already be installed and configured for your framework. No Zenos package source scanning or additional Tailwind configuration is required. If suggestions are missing, follow [Troubleshoot IntelliSense](/getting-started/project-setup/#troubleshoot-intellisense).
My app does not use Tailwind CSS Use the compiled stylesheet in `index.css` instead: ```css title="src/index.css" @import "@zentara-co/zenos-ui/styles.css"; ``` Add your own CSS rules below the import. This stylesheet includes the component styles, layout helpers, and theme tokens without requiring Tailwind.
Choose one setup. Do not import `styles.css` together with `tailwind.css`, and remove any separate package CSS import from `.tsx` files. Global CSS also styles menus and dialogs that render outside the component that opened them. ### Connect index.css to your framework The examples below use `index.css` as the global stylesheet. Keep existing application code and move your shared CSS rules into that file when changing its name.
Vite — src/main.tsx Put the CSS imports above in `src/index.css`, then load that file: ```tsx title="src/main.tsx" import "./index.css"; ``` The React app is already interactive. Keep the existing `createRoot` setup below this import.
Next.js — app/layout.tsx Put the CSS imports above in `app/index.css`, then load that file: ```tsx title="app/layout.tsx" import "./index.css"; ``` Keep the root layout on the server. Put `"use client"` at the top of a component file when it owns state or event handlers, such as the form in Quick Start. For the Pages Router, load the same global stylesheet from `pages/_app.tsx` using its relative path.
Astro with React — your shared .astro layout Put the CSS imports above in `src/styles/index.css`, then load that file in the layout's frontmatter: ```astro title="src/layouts/AppLayout.astro" --- import "../styles/index.css"; --- ``` Astro renders React components as HTML by default. To make a form or dialog interactive, import it into an Astro page and add `client:load`: ```astro title="src/pages/index.astro" --- import AppLayout from "../layouts/AppLayout.astro"; import ProjectForm from "../components/ProjectForm"; --- ``` This assumes your shared layout renders a `` and the [React integration](https://docs.astro.build/en/guides/integrations-guide/react/) is installed. Keep static content unhydrated; use `client:idle` or `client:visible` for interactions that can wait.
React Router Framework Mode — app/root.tsx Put the CSS imports above in `app/index.css`, then load that file: ```tsx title="app/root.tsx" import "./index.css"; ``` Keep your existing document, ``, ``, and ``. The root route loads these styles for every page. See the [React Router styling guide](https://reactrouter.com/explanation/styling) for route stylesheet links.
TanStack Start — src/routes/__root.tsx Put the CSS imports above in `src/index.css`, then load that file: ```tsx title="src/routes/__root.tsx" import "../index.css"; ``` Keep the root document's `` and ``. See the [TanStack Start styling guide](https://tanstack.com/start/latest/docs/framework/react/guide/css-styling) for stylesheet links when your setup requires them.
## 3. Check your first component Render this component on a page in your app: ```tsx title="Welcome.tsx" import { Button } from "@zentara-co/zenos-ui"; export default function Welcome() { return ; } ``` Start your app with its usual development command and open that page. You should see a styled primary button. Press Tab to check its visible focus outline. This button checks the installation; it has no click action yet. Run your app's type check and production build before continuing to [Quick Start](/getting-started/quick-start/), where you will add a working form. ## Optional finishing touches
Match the fonts in the docs Zenos uses SUSE, Albert Sans, and Geist Mono font stacks. The package does not download the fonts for you. Load them through your framework or self-host them; system fonts work as fallbacks. See [Fonts](/foundations/fonts/) for setup and supported weights.
Add dark mode Zenos supports `.dark` or `data-theme="dark"` on the document root. Use [ThemeToggleButton](/components/theme-toggle-button/) or [useTheme](/hooks/use-theme/) if Zenos should manage the preference. For server-rendered apps, apply the saved theme before the page is painted. Use the same storage key everywhere (`theme` by default). If another provider owns the theme, share that key or disable Zenos persistence with `storageKey={null}`. See [Dark mode](/foundations/dark-mode/) for the full example. Keep browser-only reads such as `localStorage` out of server rendering. The server and client should initially render the same content.
Add recipes or AI instructions The CLI can copy recipes into your app and create instructions for your AI assistant. Start with the [CLI guide](/getting-started/cli/) or [Working with AI](/getting-started/working-with-ai/). Calendar, Carousel, Chart, Data Table, and File Upload bring their extra dependencies only when you install those recipes.
## If something goes wrong - **401, 403, or package not found:** check that the `@zentara-co` scope resolves to `https://registry.npmjs.org`, remove any old GitHub Packages mapping, and confirm the requested version exists on npm. - **The button is unstyled:** check that your entry or root layout loads `index.css` and that its Zenos import appears before your own CSS rules. - **Tailwind suggestions are missing:** use `@import "tailwindcss"` and `@import "@zentara-co/zenos-ui/tailwind.css"` in `index.css`, then check the [IntelliSense setup](/getting-started/project-setup/#troubleshoot-intellisense). - **Menus or dialogs are unstyled:** load the stylesheet globally, so it also covers content rendered elsewhere in the document. - **Astro controls do not respond:** add a client directive to the React component that owns the interaction. - **A server-rendering or hydration error appears:** check the framework's client boundary and remove browser-only reads from server rendering. Need application configuration next? Continue to [Project Setup](/getting-started/project-setup/). Source: https://zenos-ui.pages.dev/getting-started/installation/ --- # Quick Start Try a project form, copy its code, and adapt it to your app. Build a project form with a name, region, notes, and a submit button. This example shows a confirmation message in the browser; it does not save to a server. First, complete [Installation](/getting-started/installation/). You should already be able to render a styled Zenos button. Try it, copy it, make it yours: One working form takes you through the basics. 1. **Try the preview.** `Enter a name → submit → see confirmation`. Test the form below before changing anything. 2. **Copy the code.** `Code tab → ProjectForm.tsx → your page`. Use the same source that powers the preview. 3. **Connect your app.** `Your fields + validation + save action`. The demo confirms locally. Your app decides how to save real data. ## 1. Try the form Enter a project name, choose a region, and select **Create project**. You should see “Project created locally.” without a page reload. ```tsx import { Button, Field, FormLayout, Input, Select, Text, Textarea } from "@zentara-co/zenos-ui"; import { type SubmitEvent, useState } from "react"; function FormExample() { const [created, setCreated] = useState(false); return ( ) => { event.preventDefault(); setCreated(true); }} > Project name } /> Use a name your team will recognize. Region Singapore Frankfurt Notes } /> {created ? "Project created locally." : ""} ); } ``` The name is required. Try submitting with it empty, then use Tab and the arrow keys to move through the form and select a region. ## 2. Add it to your app Open **Code** in the preview and copy the example into a component file, such as `src/ProjectForm.tsx`. The displayed code comes from the same source as the working preview. Add this line at the end of the copied file so another file can import it: ```tsx export default FormExample; ``` Then render it from your page. For a Vite app, your `src/App.tsx` could be: ```tsx title="src/App.tsx" import ProjectForm from "./ProjectForm"; export default function App() { return ; } ``` In Next.js, add `"use client"` at the top of the form file because it uses React state. In Astro, render the form with `client:load`. The [framework setup examples](/getting-started/installation/#2-load-the-styles) show where styles and client boundaries belong. ## 3. Make it yours Start with the labels, placeholders, and region choices. Then replace the example's `setCreated(true)` with your app's save operation, including loading and error states. The form is built from a few pieces: - **FormLayout** arranges the fields in one column, then two from the `md` breakpoint. - **Field** connects a label, input, description, and any error message. - **Input, Select, and Textarea** let people enter and choose values. - **Button** submits the form. **Text** announces the local confirmation.
How does a label connect to an input? Keep the control inside its `Field.Root`. `Field.Control` passes the field's ID, required state, and accessible relationships to the `Input` through `render`: ```tsx Project name } /> Use a name your team will recognize. ``` Add your application's validation rules when connecting a real save operation. Use `invalid` and `Field.Error` to display an error that explains how to fix the value. See [Field](/components/field/) for the full API.
How do I change the columns or spacing? Change the layout props on the form: ```tsx {/* Fields and actions */} ``` `base: 1` means one column on smaller screens. `md: 2` means two columns from the medium breakpoint. `gap="4"` uses the spacing scale. The preview also uses a few Tailwind classes for width, alignment, and the Notes field's span. If your app does not use Tailwind, replace those classes with your own CSS. Zenos components and responsive layout props work with the package stylesheet alone. See [FormLayout](/layout/form-layout/) and [Layout composition](/layout/composition/) for more layouts.
When should my app manage a field's value? The example's Select uses `defaultValue="singapore"`, so it manages the selected region itself. Use `value` with `onValueChange` when your app needs to read, reset, or coordinate that selection. See the [controlled Select example](/components/select/). Native inputs such as `Input` use their normal React props, including `value` and `onChange`. Keep your save logic and validation in your form or feature code.
## Check your version Before connecting real data: 1. Submit a filled form and confirm it updates without reloading the page. 2. Use only the keyboard to enter values, choose a region, and submit. 3. Resize the page and check that fields remain readable and in the right order. 4. Check both themes if your app supports dark mode. 5. Run your app's tests, type check, and production build. Next, try [Dialog](/components/dialog/) for an edit flow, [AppShell](/layout/app-shell/) for a full page, or [Working with AI](/getting-started/working-with-ai/) to give your assistant the Zenos context. Source: https://zenos-ui.pages.dev/getting-started/quick-start/ --- # Project Setup Set up shared styles, imports, and optional themes for your Zenos app. Once your first component works, set up the defaults that every page will share. This guide covers where styles belong, how to import components, and what to check before building more screens. Complete [Installation](/getting-started/installation/) first. Keep the files your framework created and add the settings you need below. Set up once, use across your pages: Start with shared styles and imports, then check them in your app. 1. **Load shared styles.** `Tailwind + Zenos CSS → index.css`. Load the package styles once, followed by your own rules. 2. **Use public imports.** `UI package → components, layouts, and hooks`. Use the package root. Installed recipes come from your local files. 3. **Check a real page.** `Styles + keyboard + theme + build`. Try the controls, check any theme changes, and build your app. ## 1. Keep styles in one place Use `index.css` as the global stylesheet and keep all package CSS imports there. Your framework entry or root layout imports only this local file. The [Installation examples](/getting-started/installation/#connect-indexcss-to-your-framework) show the path for each framework. For Tailwind CSS v4, start `src/index.css` with these imports, then add shared rules and theme overrides: ```css title="src/index.css" @import "tailwindcss"; @import "@zentara-co/zenos-ui/tailwind.css"; body { margin: 0; background: var(--background-default); color: var(--text-default); } ``` Load that file once from your application entry: ```tsx title="src/main.tsx (style import)" import "./index.css"; ``` Remove any direct Zenos CSS import from `.tsx` files. Loading CSS globally also styles menus and dialogs that appear outside the component that opened them.
My app does not use Tailwind CSS Replace the two Tailwind imports with the compiled stylesheet import at the top of `index.css`: ```css title="src/index.css" @import "@zentara-co/zenos-ui/styles.css"; ``` Keep your shared rules below that import. Tailwind is optional with this setup.
### Troubleshoot IntelliSense Tailwind CSS IntelliSense discovers a Tailwind v4 project through a CSS file that imports Tailwind. Zenos' `tailwind.css` entrypoint also exposes its theme and custom variants to the compiler and editor. Importing the compiled `styles.css` from a `.tsx` file does not provide that metadata. If Zenos suggestions still do not appear: 1. Confirm that `tailwindcss` v4 is installed and configured in the application workspace, and the Tailwind CSS IntelliSense extension is enabled. 2. Confirm that `index.css` contains both `@import "tailwindcss"` and `@import "@zentara-co/zenos-ui/tailwind.css"`, and that your application entry loads this CSS file. 3. In VS Code or Cursor, run **Tailwind CSS: Show Output** and confirm that `index.css` was detected as the project entrypoint. If automatic detection fails, set the CSS entrypoint explicitly: ```json title=".vscode/settings.json (setting to merge)" { "tailwindCSS.experimental.configFile": "src/index.css" } ``` Use your framework's actual `index.css` path. For multiple entrypoints, follow the [Tailwind CSS IntelliSense configuration guide](https://github.com/tailwindlabs/tailwindcss-intellisense#tailwindcssexperimentalconfigfile). You do not need to add Zenos package source to Tailwind's scan paths. Do not load the compiled `styles.css` and Tailwind-native `tailwind.css` entrypoints together. ## 2. Use the public imports Components, layout helpers, hooks, and types come from the package root: ```tsx import { Button, Stack, type ButtonProps } from "@zentara-co/zenos-ui"; ``` Your editor can suggest props and report mistakes using the included TypeScript declarations. Use the component's docs to see its supported props. Package `src` paths and repository files are private implementation details. Recipes, such as Calendar or Data Table, are different: the CLI copies their source into your app. Import a recipe from the local path printed by the installer. See the [CLI guide](/getting-started/cli/#add-a-recipe) when you need one. ### Bundle behavior Zenos publishes unbundled ES modules so your bundler can remove components and utilities that your application does not import. The JavaScript modules are side-effect free. Use named imports from the package root: ```tsx import { Button } from "@zentara-co/zenos-ui"; ``` CSS files are intentionally marked as side effects so an explicit stylesheet import is preserved. Load either the compiled `@zentara-co/zenos-ui/styles.css` entrypoint or the Tailwind-native `@zentara-co/zenos-ui/tailwind.css` entrypoint once; do not load both. Importing a component does not inject styles or change global browser state.
Check my TypeScript settings Keep your framework's generated configuration. In the config used by your app, enable strict checking if it is not already enabled: ```json title="tsconfig.json (setting to merge)" { "compilerOptions": { "strict": true } } ``` Merge this setting into the existing file. Preserve its `extends`, JSX settings, environment types, aliases, plugins, and project references. Some projects keep app settings in `tsconfig.app.json` or an inherited config. Use the React 19 types that match your React installation. Modern framework templates already configure module resolution and JSX; a Zenos-specific TypeScript preset is not needed.
Where should I put my own files? For a small Vite app, start with the files you use: ```text src/ ├── App.tsx Your app's main component ├── components/ Components shared across pages ├── features/ Forms, data, and UI for each feature ├── index.css Global styles and theme overrides └── main.tsx Existing React entry and index.css import ``` Keep your framework's route folders if it has them. Add folders when code needs a home; an empty folder for every possible concern is unnecessary. In a monorepo, install Zenos in the app package that renders React. Keep feature-specific code beside that feature. See [File Organization](/getting-started/file-organization/) as your app grows.
## Optional: customize the theme Zenos works with its default styles. Open the sections below if your app needs a theme switch or custom colors.
Add a light and dark theme switch For a client-rendered React app, add this component to your header or settings page: ```tsx title="src/components/ThemeControl.tsx" import { ThemeToggleButton } from "@zentara-co/zenos-ui"; export function ThemeControl() { return ; } ``` The button changes the document theme and saves the preference under the storage key `theme`. Switch it, reload the page, and confirm the selected theme stays active. For server-rendered apps, keep the root layout on the server and put interactive controls inside the framework's client boundary. Apply the initial theme in the document head before the page is painted to avoid a flash. Follow [Dark mode](/foundations/dark-mode/#prevent-a-theme-flash) for the initialization script and [useTheme](/hooks/use-theme/) for server-rendering considerations. Use the same storage key in that script and every theme control. If your app already has a theme provider, pass its `theme` and `onThemeChange` values to `ThemeToggleButton`. That provider should apply the theme to the document and manage persistence.
Change the app's colors Add token overrides to the `index.css` file that loads after Zenos. A token is a named CSS variable used by multiple components: ```css title="src/index.css (add below imports)" :root { --background-default: #ffffff; --text-default: #171717; --border-default: rgb(23 23 23 / 10%); } :root.dark, :root[data-theme="dark"] { --background-default: #101010; --text-default: #f5f5f5; --border-default: rgb(255 255 255 / 12%); } ``` These variables change the page colors used in step 1 and components that use those same roles. Other surfaces and button variants have their own tokens. See [Theme customization](/foundations/tokens/) and [Colors](/foundations/colors/) for the full set. Use tokens for changes shared across your app, and `className` or `style` for a local adjustment. Check text, borders, and focus indicators in both themes after changing colors.
Add an editable recipe Preview a Calendar installation from your app's folder. The [CLI](/getting-started/cli/#start-here) runs directly without a project installation: ```bash pnpm dlx @zentara-co/zenos-cli add calendar --dry-run npx @zentara-co/zenos-cli add calendar --dry-run yarn dlx @zentara-co/zenos-cli add calendar --dry-run bunx @zentara-co/zenos-cli add calendar --dry-run ``` The preview reports the planned changes without modifying your app. When the destination and dependencies look right, run: ```bash pnpm dlx @zentara-co/zenos-cli add calendar npx @zentara-co/zenos-cli add calendar yarn dlx @zentara-co/zenos-cli add calendar bunx @zentara-co/zenos-cli add calendar ``` The CLI copies editable source and installs the recipe's extra dependencies. Use the local import path in its output. See [Calendar](/recipes/calendar/) for examples and the [CLI guide](/getting-started/cli/) for destination and overwrite options.
## 3. Check a real page Use the [Quick Start form](/getting-started/quick-start/) or a page you have already built: 1. **Open the page:** buttons, inputs, and page text should be styled. 2. **Use the keyboard:** Tab between controls and check that focus is visible. Open a Select or Dialog and confirm its popup is styled too. 3. **If you added dark mode:** switch themes and reload. The selected theme should remain active; check a second tab if you use shared persistence. 4. **Run your app's checks:** type-check and build with the scripts in your `package.json`. If you installed a recipe, render it from its local path too. If styles are missing, check the global import first. If a theme resets, check the storage key and which provider owns it. If an import fails, check the package installation and the documented export. Continue with [File Organization](/getting-started/file-organization/) to organize your feature code, or [Layout composition](/layout/composition/) to build your next screen. Source: https://zenos-ui.pages.dev/getting-started/project-setup/ --- # File Organization Decide where a file belongs, and let your AI follow the same rules. Zenos works with your app's existing folders. Keep your framework's routes and naming conventions, then place new code beside the feature that uses it. You do not need to set up a folder template before building. If you use a coding assistant, the optional [Zenos development skill](/getting-started/working-with-ai/#add-the-development-skill) guides it through inspecting, building, and checking a feature. Where should this file go?: Follow the framework first, then choose the smallest owner. 1. **A route or page entry?.** `app/ or routes/`. Keep routing files where your framework expects them. 2. **Used by one feature?.** `features/projects/`. Keep its UI, requests, hooks, and tests together. 3. **Shared across features?.** `components/, hooks/, or lib/`. Share code when multiple features need the same behavior. ## Start with one feature For a new app without an established structure, a project-management feature could look like this: ```text src/ ├── routes/ Framework route files ├── features/ │ └── projects/ │ ├── _components/ │ │ ├── project-form.tsx │ │ └── project-form.test.tsx │ ├── _api/ │ │ └── create-project.ts │ ├── _hooks/ │ │ └── use-create-project.ts │ └── index.ts Exports used outside this feature ├── components/ UI shared across features └── index.css Global styles and theme overrides ``` The route displays the page. The feature owns its form, save request, and related state. Shared components receive data and callbacks from the feature. Add folders as the code needs them. A small form may start in one file. Keep your router's actual folder name, and use the naming convention already in your app. Underscores mark private intent; they do not prevent imports by themselves. ## Keep feature details local For example, a route can import a feature's public entry: ```tsx import { ProjectForm } from "~/features/projects"; ``` That entry explicitly exports what other code may use: ```ts title="src/features/projects/index.ts" export { ProjectForm } from "./_components/project-form"; ``` Use your app's configured alias; `~/` works only when your TypeScript and bundler configuration define it. Inside the feature, use relative imports. Other features should use the public entry instead of importing private files. Move a component into the shared `components` folder when multiple features need the same behavior. Two uses inside the Projects feature still belong to Projects. Keep API calls and project-specific types out of generic shared UI. Zenos components come from `@zentara-co/zenos-ui`. Installed recipes stay at the local destination printed by the CLI, such as `src/components/ui`. Feature components can use both. ## Let your AI follow the workflow Install the [development skill](/getting-started/working-with-ai/#add-the-development-skill), then give your assistant a concrete task: ```text Use zenos-app-development to add a project creation form. Inspect our existing routes and features first. Reuse our save API and validation, keep project-only code together, and check the form's keyboard behavior and the app's tests. ``` The skill reads relevant CLI guidance, including `zenos docs organization --dense`, when structure matters. It follows an existing app's conventions and uses feature folders as a starting point for a new app. Keep team-specific decisions in your project's AI instructions, outside the generated Zenos block. For example: “Use our existing routes folder and keep project-only components under the projects feature.” The skill supplements those instructions. ## Before you finish Check that each new file has a clear owner, shared UI receives data through props, and imports respect feature boundaries. Run the app's checks and try the changed flow. Instructions guide the AI; the working result is what you review. Continue with [Working with AI](/getting-started/working-with-ai/) for setup, or [Project Setup](/getting-started/project-setup/) for global styles and themes. Source: https://zenos-ui.pages.dev/getting-started/file-organization/ --- # CLI Use the Zenos command-line tool to find components, set up AI, and add editable recipes. The CLI is a tool you run in your terminal. Use it to find a component, help your AI use Zenos, or add a ready-made feature such as a date picker. Choose what you want to do: - **Find a component:** `zenos component Dialog` → Import path + docs. Read the answer in your terminal. - **Set up your AI:** `zenos init --features agents` → AGENTS.md. Instructions your assistant can read. - **Add a date picker:** `zenos add calendar` → Editable files in your app. Recipe source + its extra dependency. ## Start here Open a terminal in your app's folder, where `package.json` lives. You need Node.js 20 or newer. For recipes, [install Zenos UI](/getting-started/installation/) first. ### Run the CLI directly You can use the CLI without installing it in your project. Run `bunx @zentara-co/zenos-cli `, `npx @zentara-co/zenos-cli `, or use another package runner such as `pnpm dlx` or `yarn dlx`. Choose your package manager below. Your selection applies to every command on this page. ```bash pnpm dlx @zentara-co/zenos-cli component Dialog npx @zentara-co/zenos-cli component Dialog yarn dlx @zentara-co/zenos-cli component Dialog bunx @zentara-co/zenos-cli component Dialog ``` You should see the component's import path and documentation link: ```text Dialog (component) Import: @zentara-co/zenos-ui Docs path: /components/dialog/ ``` The command also reminds you to check the installed types for exact props. Lookups print information; they do not change your app.
Prefer a local CLI installation? You can optionally add the CLI to your development dependencies to pin its version: ```bash pnpm add -D @zentara-co/zenos-cli npm install -D @zentara-co/zenos-cli yarn add -D @zentara-co/zenos-cli bun add -d @zentara-co/zenos-cli ``` Commit `package.json` and your lockfile so your team uses the same version. Run the installed executable with `pnpm exec zenos `, `npm exec -- zenos `, `yarn exec zenos `, or `bunx --no-install zenos `. The examples below run the published package directly.
## Find a component List the catalog, then look up the component you need: ```bash pnpm dlx @zentara-co/zenos-cli component --list npx @zentara-co/zenos-cli component --list yarn dlx @zentara-co/zenos-cli component --list bunx @zentara-co/zenos-cli component --list ``` Names such as `Dialog`, `Stack`, `useTheme`, and `split-button` all work. A lookup gives you a public import path, a docs path, and any component-specific notes. Read the linked docs for examples and the installed TypeScript declarations for exact props. For shorter output to give an AI, add `--dense`: ```bash pnpm dlx @zentara-co/zenos-cli component Dialog --dense npx @zentara-co/zenos-cli component Dialog --dense yarn dlx @zentara-co/zenos-cli component Dialog --dense bunx @zentara-co/zenos-cli component Dialog --dense ``` You can also look up a shared rule, such as the prop naming conventions: ```bash pnpm dlx @zentara-co/zenos-cli docs api --dense npx @zentara-co/zenos-cli docs api --dense yarn dlx @zentara-co/zenos-cli docs api --dense bunx @zentara-co/zenos-cli docs api --dense ```
All guidance topics and version details Available topics: `accessibility`, `api`, `architecture`, `organization`, `react`, `recipes`, `security`, `styling`, `testing`, and `typescript`. The catalog ships with the CLI. Keep your CLI and UI versions aligned; when they differ, the installed UI types determine which APIs you can use. The CLI does not inspect the UI package to build its catalog.
## Set up your AI ```bash pnpm dlx @zentara-co/zenos-cli init --features agents npx @zentara-co/zenos-cli init --features agents yarn dlx @zentara-co/zenos-cli init --features agents bunx @zentara-co/zenos-cli init --features agents ``` This creates or updates the Zenos instructions inside `AGENTS.md`. Your AI reads them to learn which commands and components to use. Your own instructions outside the Zenos block stay in place. Continue to [Working with AI](/getting-started/working-with-ai/) to choose your tool and try your first prompt. For an optional workflow that guides feature development, install the skill: ```bash pnpm dlx @zentara-co/zenos-cli init --features skills npx @zentara-co/zenos-cli init --features skills yarn dlx @zentara-co/zenos-cli init --features skills bunx @zentara-co/zenos-cli init --features skills ``` This writes `zenos-app-development` under `.agents/skills` for Codex and Cursor. Use `--agent claude` for `.claude/skills`, or `--agent all` for both locations. Add `--dry-run` to preview. Existing skill contents are preserved unless you explicitly use `--overwrite`. See [Add the development skill](/getting-started/working-with-ai/#add-the-development-skill) for usage and updates. ## Add a recipe A recipe is component source copied into your app. You can edit it. It also installs any extra library that the feature needs. Try Calendar, which includes a calendar, date picker, and date-range picker: ### 1. Preview the changes ```bash pnpm dlx @zentara-co/zenos-cli add calendar --dry-run npx @zentara-co/zenos-cli add calendar --dry-run yarn dlx @zentara-co/zenos-cli add calendar --dry-run bunx @zentara-co/zenos-cli add calendar --dry-run ``` In an interactive terminal, the CLI first asks for a directory. Press Enter to accept the detected folder, or type another path. You will then see the destination files and any missing dependencies. `--dry-run` makes no changes to your project. ### 2. Install the files ```bash pnpm dlx @zentara-co/zenos-cli add calendar npx @zentara-co/zenos-cli add calendar yarn dlx @zentara-co/zenos-cli add calendar bunx @zentara-co/zenos-cli add calendar ``` The CLI installs `@daypicker/react` if needed and copies three files into your component folder: ```text Your component folder/ ├── calendar.tsx ├── date-picker.tsx └── date-range-picker.tsx ``` ### 3. Use the component Check the paths printed by the command. For example, if it created `src/components/date-picker.tsx`, a file in `src/pages` can import it like this: ```tsx import { DatePicker } from "../components/date-picker"; ``` Follow the [Calendar examples](/recipes/calendar/) to render it, then run your app's checks. You own the copied files and can adjust their styling and behavior.
Other recipes you can add - [animated-number](/recipes/animated-number/): `animated-number.tsx`, using `@number-flow/react`. - [animated-label](/recipes/animated-label/): `animated-label.tsx`, using native browser animations with no extra dependency. Replace `calendar` in the command with one of these names: - [carousel](/recipes/carousel/): `carousel.tsx`, using `embla-carousel-react`. - [chart](/recipes/chart/): `chart.tsx`, using `recharts`, plus missing chart theme tokens. - [data-table](/recipes/data-table/): `data-table.tsx`, using `@tanstack/react-table`. - [file-upload](/recipes/file-upload/): `file-upload.tsx`, using `react-dropzone`. - [time-picker](/recipes/time-picker/): `time-picker.tsx`, `time-range-picker.tsx`, and `time-picker.css`, using `timepicker-ui-react` and `timepicker-ui`. Only missing dependencies are installed.
## Options and troubleshooting
Where do files go? Which package manager runs? The CLI starts at the nearest `package.json`. Choose a destination with `--dir`: ```bash pnpm dlx @zentara-co/zenos-cli add calendar --dir src/_components/ui npx @zentara-co/zenos-cli add calendar --dir src/_components/ui yarn dlx @zentara-co/zenos-cli add calendar --dir src/_components/ui bunx @zentara-co/zenos-cli add calendar --dir src/_components/ui ``` Relative paths are resolved from that project root, even when you run the command from a nested folder. Absolute paths are also accepted. A missing destination is created during installation; quote paths containing spaces. `--dir=src/_components/ui` is equivalent. Use the same option with `--dry-run` to preview files or `--overwrite` to replace recipe files at that destination. Adjust your recipe imports to match the selected folder. Without `--dir`, an interactive terminal asks where to put the recipe files. Press Enter to accept the suggested directory or type a relative or absolute path. Ctrl+C or end-of-input cancels before dependencies are installed or files are copied. Passing `--dir` skips the prompt. Non-interactive runs, including piped commands, use the detected directory automatically. The suggested directory comes from existing UI folders checked in this order: ```text src/_components/ui → src/components/ui src/app/_components/ui → src/app/components/ui app/_components/ui → app/components/ui _components/ui → components/ui ``` If none exists, it checks `_components` and `components` under the same roots and in the same order. Within a root, `_components` takes precedence. Only existing directories qualify; a file named `ui` is ignored. If no component directory exists, an alias pointing into `src` selects `src/components/ui`. Otherwise, it creates `src/components` when `src` exists, or `components` at the project root. Lockfiles select the package manager: pnpm, Bun, Yarn, then npm, checked from the project directory upward. Without a lockfile, the CLI checks `packageManager` in `package.json`, then falls back to npm. Use `--dry-run` to see the detected manager and destination.
Recipe files already exist The CLI stops before installing or copying anything. To keep your edits, leave the files in place. To replace all files in the recipe, review or commit your changes first, then run: ```bash pnpm dlx @zentara-co/zenos-cli add calendar --overwrite npx @zentara-co/zenos-cli add calendar --overwrite yarn dlx @zentara-co/zenos-cli add calendar --overwrite bunx @zentara-co/zenos-cli add calendar --overwrite ``` `--overwrite` replaces recipe source. It does not downgrade a dependency already declared by your app.
Chart tokens and missing stylesheets Chart adds missing `--chart-1` through `--chart-5`, `--chart-grid`, `--chart-axis`, and `--chart-tooltip` tokens to the first recognized global stylesheet. Existing tokens stay unchanged. If no stylesheet is found, the CLI reports it and the component uses its built-in fallback colors. See the [Chart guide](/recipes/chart/) for theme customization.
**No package.json found:** open the terminal in your app's folder. **Zenos UI is missing:** follow [Installation](/getting-started/installation/) before adding a recipe. **Command not found:** use the full package-runner command shown above, including `@zentara-co/zenos-cli`. Check that your chosen package runner is available. For available commands and options: ```bash pnpm dlx @zentara-co/zenos-cli --help npx @zentara-co/zenos-cli --help yarn dlx @zentara-co/zenos-cli --help bunx @zentara-co/zenos-cli --help ``` Source: https://zenos-ui.pages.dev/getting-started/cli/ --- # Working with AI Set up your coding assistant, give it a clear task, and check the result. Give your AI a small instruction file so it knows how to find Zenos components and examples. Set it up once in your app, then describe what you want to build. How a task becomes working UI: After setup, your assistant follows this path. 1. **You describe the task.** `Add an Edit profile dialog`. Name the page and explain what should happen. 2. **The AI reads the references.** `Instructions → component docs → installed types`. It looks up the parts and props your app can use. 3. **Build, test, and review.** `Working UI + reported checks`. The AI edits and tests. You try the result. Using **ChatGPT or Claude in a browser**? Skip to [Share a docs page](#share-a-docs-page). The setup below is for coding tools that can read and edit your project. ## Set up your coding assistant Start in a React app with [Zenos UI installed](/getting-started/installation/). Open a terminal in the folder containing `package.json`. Run the CLI directly with `bunx`, `npx`, `pnpm dlx`, or `yarn dlx`. You do not need to install it in your project. Choose your package manager in the command tabs below. ### 1. Create the instructions For Codex or another tool that reads `AGENTS.md`, run: ```bash pnpm dlx @zentara-co/zenos-cli init --features agents npx @zentara-co/zenos-cli init --features agents yarn dlx @zentara-co/zenos-cli init --features agents bunx @zentara-co/zenos-cli init --features agents ``` You should now have an `AGENTS.md` file with a **Zenos UI agent context** section. If the file already exists, the command updates only the Zenos section.
Using Claude Code, Cursor, or several tools? **Claude Code** writes `.claude/CLAUDE.md`: ```bash pnpm dlx @zentara-co/zenos-cli init --features agents --agent claude npx @zentara-co/zenos-cli init --features agents --agent claude yarn dlx @zentara-co/zenos-cli init --features agents --agent claude bunx @zentara-co/zenos-cli init --features agents --agent claude ``` **Cursor** writes `.cursor/rules/zenos.mdc`, an always-applied project rule: ```bash pnpm dlx @zentara-co/zenos-cli init --features agents --agent cursor npx @zentara-co/zenos-cli init --features agents --agent cursor yarn dlx @zentara-co/zenos-cli init --features agents --agent cursor bunx @zentara-co/zenos-cli init --features agents --agent cursor ``` **A team using several tools** can create all three files: ```bash pnpm dlx @zentara-co/zenos-cli init --features agents --agent all npx @zentara-co/zenos-cli init --features agents --agent all yarn dlx @zentara-co/zenos-cli init --features agents --agent all bunx @zentara-co/zenos-cli init --features agents --agent all ``` Choose the command for your tool. Every target contains the same Zenos instructions; you do not need to run them all.
Commit the generated file with your project. Ask your assistant to read it before starting a task. ### 2. Try your first task Paste this into your coding assistant. Replace the page name with one in your app: ```text Read this project's AI instructions, including the Zenos section. On the settings page, add an “Edit profile” button that opens a Zenos Dialog with a name input, a Save button, and a Cancel button. Look up Button, Dialog, and Input before writing code. Check their installed types and match the surrounding page's styling. Keep the existing save logic. Check keyboard focus, Escape to close, and the app's tests. Tell me what changed and what you checked. ``` Give the assistant a screenshot or an existing page to match when appearance matters. For a new feature, also explain what saving should do. ## Check that it worked Review the changes and try the interface: - The assistant imports components from `@zentara-co/zenos-ui`. - It checks the docs and installed types before choosing unfamiliar props. - You can open the dialog, use its controls with the keyboard, and close it. - The assistant reports which checks passed and anything it could not verify. If you want to check the setup before letting it edit, ask: “Read the Zenos instructions and look up Button and Dialog. Tell me their import path and available parts. Do not edit files.” Instructions help the assistant make better choices. Tests and your review still verify the result. ## Add the development skill The optional `zenos-app-development` skill gives your assistant a workflow for building a feature: inspect the app, look up Zenos APIs, place code with its owner, implement the interaction, and run the relevant checks. It respects existing project conventions and uses feature folders when a new app has no convention yet. Run this from your app's folder: ```bash pnpm dlx @zentara-co/zenos-cli init --features skills npx @zentara-co/zenos-cli init --features skills yarn dlx @zentara-co/zenos-cli init --features skills bunx @zentara-co/zenos-cli init --features skills ``` This creates `.agents/skills/zenos-app-development/SKILL.md`, which Codex and Cursor can discover. For Claude Code, append `--agent claude` to write `.claude/skills/zenos-app-development/SKILL.md`. For a team using all three tools, use `--agent all`; Codex and Cursor share the `.agents` copy. Commit the skill with your project. Start a new assistant session if it has not discovered the new file, then try: ```text Use zenos-app-development to add a project creation form. Follow our existing feature structure, reuse our save API and validation, and check the interaction with the keyboard and the app's tests. ``` Project instructions still define the rules that apply throughout the app. The skill provides the development workflow; CLI topics and installed types provide detailed references. You can keep using the agent instructions without installing the skill.
Preview or update the skill Add `--dry-run` to preview the destination without writing files. An identical installed skill is left unchanged. If its contents differ, the CLI stops so your edits remain intact. After upgrading the CLI, review or commit your existing skill before replacing it. Use `--overwrite` to replace the whole `SKILL.md`, and include the same `--agent` target you used when installing. Combine `--overwrite --dry-run` to preview the replacement first. See [File Organization](/getting-started/file-organization/) for the short visual reference. Skill discovery follows the tool's project directories: [Codex](https://developers.openai.com/codex/skills), [Claude Code](https://code.claude.com/docs/en/skills), and [Cursor](https://cursor.com/docs/skills).
## Share a docs page For a question in ChatGPT, Claude, or another browser chat, use **Copy page** at the top of any docs page. Paste that Markdown with your question. The menu also offers **View as Markdown**, **Open in ChatGPT**, and **Open in Claude**. For example: ```text Read https://zenos-ui.pages.dev/components/dialog.md. Show me a dialog with a name input and Save and Cancel buttons. ``` Use the smallest reference that answers your question: - **One component:** its `.md` page, including examples and the API table. - **Find the right page:** [/llms.txt](/llms.txt), the documentation index. - **Whole-library research:** [/llms-full.txt](/llms-full.txt), the complete docs. This is a large file; it is usually unnecessary for a single UI task. The website describes the published docs. Your installed UI types are the reference for the version in your app. ## Keep the instructions up to date After upgrading Zenos, run the same `init` command you used during setup. Keep the CLI and UI versions aligned, then review and commit the updated instruction file. To preview every supported target without changing files: ```bash pnpm dlx @zentara-co/zenos-cli init --features agents --agent all --dry-run npx @zentara-co/zenos-cli init --features agents --agent all --dry-run yarn dlx @zentara-co/zenos-cli init --features agents --agent all --dry-run bunx @zentara-co/zenos-cli init --features agents --agent all --dry-run ```
Where should I put my own project rules? Keep them outside the generated markers. For example: ```md # Project rules - Match the existing settings pages. - Keep our current form validation and save logic. - Run the project's tests after making changes. Zenos manages the instructions inside this block. ``` Rerunning `init` replaces only the marked section. Your app decides its architecture, naming, and testing conventions. Zenos adds component usage guidance.
What does the generated file teach the assistant? It explains public imports, component lookup commands, recipe installation, prop naming, styling tokens, keyboard behavior, and accessibility. More detailed guidance stays in the CLI so the assistant can request it when needed: ```bash pnpm dlx @zentara-co/zenos-cli component Dialog --dense npx @zentara-co/zenos-cli component Dialog --dense yarn dlx @zentara-co/zenos-cli component Dialog --dense bunx @zentara-co/zenos-cli component Dialog --dense ``` ```bash pnpm dlx @zentara-co/zenos-cli docs api --dense npx @zentara-co/zenos-cli docs api --dense yarn dlx @zentara-co/zenos-cli docs api --dense bunx @zentara-co/zenos-cli docs api --dense ``` `--dense` asks for shorter output. CLI lookups use the catalog shipped with the CLI; they do not inspect your installed UI version. Exact props and available parts come from the installed TypeScript declarations. See the [CLI guide](/getting-started/cli/#find-a-component) for all lookup topics.
## If something goes wrong **The assistant ignores Zenos:** ask it to read the generated file, then look up the components it plans to use. Check that you chose the target for your coding tool. **It uses a prop that does not exist:** ask it to verify the prop against your installed UI types. Check that the CLI and UI versions match. **The command reports invalid markers:** keep exactly one `zenos:agent-docs:start` and one `zenos:agent-docs:end`, in that order, then retry. The CLI leaves files unchanged when it finds malformed markers. **You need help with the commands:** follow the [CLI quick start](/getting-started/cli/#start-here). Source: https://zenos-ui.pages.dev/getting-started/working-with-ai/ --- # Design principles The product and engineering decisions that keep Zenos coherent. Zenos helps teams build dense, dependable product interfaces without hiding the platform beneath another layer of abstraction. Its components share one visual language and one public API, while remaining flexible enough for real application work. The system separates responsibility deliberately. Native HTML supplies semantics, Base UI supplies complex interaction behavior, generated CSS applies the visual system, Zenos defines the public contract, and the consuming application owns product meaning and workflows. ## Core principles **Clear before clever.** Names, states, and component anatomy should explain themselves at the call site. Familiar concepts use familiar vocabulary. **Compose before abstracting.** Small public parts combine into real workflows. New abstractions earn their place through repeated product needs. **Structure stays neutral.** Layout primitives control space and flow. Decoration remains an intentional choice made with semantic tokens. **Behavior stays trustworthy.** Native and Base UI semantics survive styling, wrapping, polymorphism, and custom composition. **Information leads.** Hierarchy, spacing, and contrast help people scan dense interfaces without unnecessary visual noise. **Escape hatches remain useful.** Public components accept native props, `className`, `style`, ARIA attributes, and data attributes without exposing internals. ## Build from meaning Use the element or component that matches the content's responsibility. A `Button` performs an action. A `Link` navigates. `Field` owns labels, descriptions, errors, and validation semantics. `InputGroup` only arranges related controls. Visual similarity is not enough reason to merge responsibilities. Keeping boundaries narrow makes components easier to combine, test, and replace. When a component starts to own data fetching, authorization, product copy, and several unrelated layouts, split it by responsibility rather than adding more configuration props. ## Prefer semantic decisions Components use roles such as `background`, `surface`, `foreground`, `border`, and `primary`. They do not depend on a specific shade working in every theme. The same rule applies to spacing, elevation, typography, and status colors. Primitive values remain available for theme authors. Product code should prefer semantic tokens so light mode, dark mode, and custom themes preserve the intended hierarchy. Hardcoded values are appropriate only when they represent fixed content rather than a theme decision. A logo's authored color may be fixed; a success message should use the semantic success role. ## Reveal structure through composition Compound components expose meaningful parts such as `Root`, `Trigger`, `Content`, `Item`, and `Indicator`. Consumers can arrange those parts around their content without depending on private wrappers. ```tsx }>Review changes Publish changes? The update will be visible to every member. Cancel ``` Layout uses the polymorphic `as` prop. Base UI-backed interactive parts use `render`. Keeping these mechanisms distinct makes their purpose predictable. ## Design for real content Zenos components must continue to work with long labels, empty results, validation errors, narrow containers, increased browser zoom, [RTL content](/foundations/rtl/), and reduced motion. Responsive behavior should follow the available space rather than assume one ideal screen. Truncation is reserved for content that can safely lose visual detail. Essential instructions, errors, and actions should wrap or remain otherwise available. ## Make density support comprehension Dense product interfaces should reduce wasted space, not remove hierarchy. Use proximity to group related information, alignment to make comparison easier, and contrast to identify the next decision. Give primary actions and exceptional states more emphasis than persistent chrome. Do not solve density by shrinking every control or muting every label. Touch targets, focus indicators, readable type, and error recovery remain usable at compact densities. Test scanning with realistic data, not only symmetrical placeholders. ## Design every interaction state A component is not finished at its default appearance. Review hover, pressed, selected, focused, disabled, invalid, loading, empty, and destructive states where they apply. The state must remain understandable through more than color alone. Loading should preserve enough structure to prevent avoidable layout shift. Empty states should explain what is absent and, when appropriate, how to proceed. Destructive actions should communicate consequence before commitment and recovery after failure. [Motion](/foundations/motion/) should explain spatial or state change, not delay work. Keep transitions interruptible, avoid motion that competes with reading, and provide an equivalent reduced-motion treatment. ## Accessibility is shared work Zenos preserves native HTML and Base UI behavior, including keyboard interaction, focus management, ARIA relationships, and disabled semantics. Consumers remain responsible for meaningful labels, useful error messages, logical workflows, and content order. Automated checks catch common regressions. Keyboard testing, screen-reader review, zoom, contrast, motion, and real content remain part of the design process. Accessibility is a constraint throughout design, implementation, and content—not a final audit. A visually elegant treatment that obscures a label, removes focus, breaks source order, or depends on pointer precision is not a valid system outcome. ## Keep specialized engines optional Calendar, carousel, chart, and data-table behavior comes from focused third-party engines installed through recipes. These dependencies are added only when a product requests the corresponding recipe, and the generated source belongs to that product. Core Zenos stays focused on general-purpose controls, layout, tokens, and interaction patterns. ## Public API contract | Concern | Convention | | ----------------------- | -------------------------------------------------------------- | | Layout polymorphism | `as` | | Interactive composition | `render` | | Value state | `value`, `defaultValue`, `onValueChange` | | Open state | `open`, `defaultOpen`, `onOpenChange` | | Visual treatment | `variant` | | Control sizing | `size="sm"`, `size="md"`, or `size="lg"` | | Interaction orientation | `orientation="horizontal"` or `orientation="vertical"` | | State semantics | `disabled`, `invalid`, `required` | | DOM identification | `data-slot`, plus `data-size` and `data-variant` when relevant | | Styling escape hatches | `className`, `style`, `aria-*`, and `data-*` | Consistency is a product feature. A new API should reuse these conventions unless the underlying concept is genuinely different. ## Review a design-system change Before accepting a new component, variant, token, or pattern, ask: 1. Does it have one clear owner and responsibility? 2. Can an existing public component or composition already express the need? 3. Does the API match established state, size, variant, and composition conventions? 4. Are native props, refs, keyboard behavior, focus, and ARIA relationships preserved? 5. Does it work with real content, responsive containers, themes, zoom, RTL, and reduced motion where relevant? 6. Are specialized dependencies isolated from the core package? 7. Do examples, types, tests, and rendered behavior prove the same public contract? Prefer the smallest complete addition. A narrow primitive with a stable responsibility is easier to compose and maintain than a broad component that predicts every future product need. Source: https://zenos-ui.pages.dev/foundations/ --- # Colors Explore semantic color roles and primitive palettes for light and dark product surfaces. Color starts with intent. Zenos components use semantic roles for surfaces, content, structure, and feedback, while primitive ramps provide the building blocks for a custom theme. ## Semantic roles Use the role that describes the job a color performs, rather than the color it happens to render. Every swatch below uses the active theme value, so the same role adapts when you switch between light and dark mode. The list focuses on the roles used most often in product interfaces. The public `@zentara-co/zenos-ui/colors.css` stylesheet also includes the complete accent ramps, interaction states, and chart permutations for specialist cases. ## Usage Add package CSS imports to your global `index.css`: use `@zentara-co/zenos-ui/tailwind.css` after `tailwindcss` for Tailwind v4, `@zentara-co/zenos-ui/styles.css` without Tailwind, or `@zentara-co/zenos-ui/colors.css` when you only need the color tokens. Reference semantic variables in application styles: ```css .product-card { background: var(--background-neutral-card); color: var(--text-default); border: 1px solid var(--border-default); } .product-card__description { color: var(--text-subtle); } .product-card__error { background: var(--background-danger-subtlest-default); color: var(--text-danger-default); border-color: var(--border-danger-subtle); } ``` Tailwind consumers can use the corresponding semantic utilities, such as `bg-background-neutral-card`, `text-text-default`, and `border-border-default`. The `--color-*` aliases connect these utilities to the same mode-aware semantic variables. Set `data-theme="light"` or `data-theme="dark"` on a theme container to choose a mode explicitly. The `.dark` class also enables dark mode; without an explicit mode, the stylesheet follows the system preference. ## Primitive palettes Primitive ramps are mode-independent building blocks for themes, data visualizations, and application-specific color roles. Each ramp is available as a CSS variable and a Tailwind color utility. Hover or focus a swatch to inspect its token name. The palette scrolls horizontally on narrow screens. ## Zentara brand colors
Zentara red Primary brand · #d31510 --color-zentara-red
Zentara black Dark neutral · #0f0f0f --color-zentara-black
Zentara white Light neutral · #f9f9f9 --color-zentara-white
Primitive values stay the same between light and dark mode. Theme authors map them to semantic roles whose values can change by mode. ## Best practices - Prefer semantic roles in components; reserve primitive ramps for theme definitions and application-specific color roles. - Pair background, text, icon, and border tokens with matching intent and appropriate contrast. Strong fills may need a contrary foreground, including the dedicated warning-contrary roles. - Use status colors only for their meaning, not as arbitrary decoration. - Check contrast on the actual rendered surface in both modes, especially for alpha colors and low-emphasis text. - Preserve focus indicators and communicate state with labels, icons, or patterns as well as color. - Override semantic variables in a scoped theme rather than hardcoding light-mode colors in component styles. Source: https://zenos-ui.pages.dev/foundations/colors/ --- # Fonts The SUSE, Albert Sans, and Geist Mono typefaces behind Zenos typography. Zenos uses three complementary typefaces. SUSE gives headings a distinct architectural voice, Albert Sans keeps interface text clear at compact sizes, and Geist Mono makes technical content easy to scan.
Foundation / Fonts

Structure, clarity, and precision.

Each family has a focused role. Their shared proportions keep product interfaces cohesive without making every layer feel identical.

SUSE · Heading Aa Bb Cc Dd Ee Ff Gg

Build calm, capable interfaces.

Albert Sans · Body Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj

The quick brown fox jumps over the lazy dog. 0123456789

Geist Mono · Code const status = "ready";

0123456789 !@#$%^&*()_+ {"{}"}[]

## Roles | Typeface | Token | Primary use | | ----------- | ---------------- | --------------------------------------------- | | SUSE | `--font-heading` | Headings, emphasis, and high-signal metrics | | Albert Sans | `--font-body` | Body copy, controls, labels, and descriptions | | Geist Mono | `--font-code` | Code, keyboard input, and technical values | ## Load the fonts Zenos defines the font stacks but does not download font files for consumer applications. Load the families through your framework, a self-hosted font pipeline, or a provider before importing Zenos styles. ```html ``` For production applications, self-hosting gives tighter control over caching, privacy, and font-display behavior. ## Semantic stacks ```css :root { --font-heading: "SUSE", ui-sans-serif, system-ui, sans-serif; --font-body: "Albert Sans", ui-sans-serif, system-ui, sans-serif; --font-code: "Geist Mono", ui-monospace, monospace; } ``` Override these variables when your product has its own approved type family. Keep the semantic roles intact so headings, body text, and code continue to use the correct stack. ## Weights Zenos uses a restrained range to keep hierarchy predictable: - SUSE: `600–700` for headings and `600` for metrics - Albert Sans: `400` for body copy, `500` for medium emphasis, and `600` for bold labels - Geist Mono: `400` for code and technical text Avoid synthetic bold and italic styles. Load every weight used by the application, and keep `font-display: swap` or an equivalent non-blocking strategy. ## Fallback behavior Every stack includes system fallbacks. The interface remains readable before web fonts load and in environments where remote fonts are unavailable. Test narrow controls and dense tables with fallback fonts because character widths may change. Source: https://zenos-ui.pages.dev/foundations/fonts/ --- # Typography A restrained type hierarchy for dense product interfaces. Zenos uses a compact semantic type system for product interfaces. Each role combines a family, size, line height, and weight so hierarchy remains consistent across controls, forms, dashboards, and long-form content. The default stacks use [SUSE, Albert Sans, and Geist Mono](/foundations/fonts/). Consumers load the font files or override the family tokens; Zenos defines how each family is used. ## Type scale
Heading h1 Build with clarity. 32 / 36
Heading h2 Build with clarity. 28 / 32
Heading h3 Build with clarity. 24 / 28
Heading h4 Build with clarity. 20 / 24
Heading h5 Build with clarity. 16 / 20
Body large

Interfaces should remain readable under pressure.

16 / 24
Body medium

Interfaces should remain readable under pressure.

14 / 20
Body small

Interfaces should remain readable under pressure.

12 / 16
Emphasis 24,860 24 / 28
Code const status = "ready"; 12 / 20
Values are shown as font size / line height in pixels. The complete heading scale continues through `h6` and `h7` for dense labels and deeply nested sections. ## Roles | Role | Family | Scale | Use | | -------- | ----------- | ------------- | ------------------------------------------------------- | | Heading | SUSE | `h1`–`h7` | Page titles, section headings, and structural hierarchy | | Body | Albert Sans | `l`, `m`, `s` | Interface copy, labels, descriptions, and messages | | Emphasis | SUSE | `l`, `m`, `s` | Metrics and short high-signal values | | Code | Geist Mono | Fixed | Commands, identifiers, shortcuts, and technical values | Choose a role by meaning before choosing a size. A metric and a heading can have similar dimensions while serving different reading patterns. ## Heading hierarchy Headings establish the document outline. Keep levels sequential and use CSS or `Text` sizing when the visual scale needs to differ from the semantic element. ```tsx Asset inventory ``` `h7` is a visual role rendered as a paragraph by default because HTML only defines six heading levels. Use `as` when another semantic element is required. ## Body copy Use medium body text for most product UI. Large body text suits introductions and comfortable reading; small body text is reserved for supporting metadata where space is constrained. Body text supports `regular`, `medium`, and `bold` weights. Prefer weight and spacing for hierarchy before reducing contrast. Long descriptions, errors, and instructions must be allowed to wrap. ## Emphasis and metrics Emphasis styles are designed for concise values such as totals, percentages, or status counts. They use the heading family without becoming part of the page outline. Use tabular numerals when values update in place or align in a column: ```tsx 24,860 ``` Do not use emphasis for long sentences. Its tighter rhythm is intended for short, scannable information. ## Code and technical content The code role uses Geist Mono with a slashed zero and disabled contextual alternates. Use it for machine-readable values, commands, keyboard input, and identifiers. Explanatory prose should remain body text. ## Color and contrast Text colors describe hierarchy and meaning: - `default` for primary content - `subtle` for supporting content - `subtlest` for low-priority metadata - feedback roles for danger, warning, success, and information - `contrary` for content on strong inverse surfaces Color does not replace labels or status text. Ensure every role remains legible against its actual surface in light and dark themes. ## Line length and wrapping Keep prose near 45–75 characters per line. Product labels may be shorter, but essential text should not be truncated simply to preserve a fixed-height layout. Use `truncate` only when the full value remains available elsewhere. Use `maxLines` for bounded previews, and test both with long unbroken values, increased browser zoom, and translated content. ## Using Text `Text` applies the semantic roles while preserving polymorphism, native attributes, refs, alignment, color, truncation, and line clamping. ```tsx Recent activity Updated five minutes ago scan_01J8M2 ``` Native headings and paragraphs remain appropriate when a Zenos-specific visual role is unnecessary. Typography should reinforce semantics rather than replace them. Source: https://zenos-ui.pages.dev/foundations/typography/ --- # Icons Phosphor by default, with the freedom to use any icon pack. Zenos uses **Phosphor Icons by default** in its documentation and examples. This is a starting point, not a requirement: **you can use any icon pack you like**, or your own SVGs. Icons are supplied by your application. Zenos does not require Phosphor as a core dependency or wrap icons in a pack-specific API. ## Default icon set Phosphor provides a consistent visual language for navigation, actions, and feedback. These are a few of the icons used in product interfaces: ## Install Phosphor Add the React package to your application if you want to use the default set: ```bash pnpm add @phosphor-icons/react npm install @phosphor-icons/react yarn add @phosphor-icons/react bun add @phosphor-icons/react ``` Import individual icon components and compose them with Zenos controls: ```tsx import { PlusIcon, TrashIcon } from "@phosphor-icons/react"; import { Button, IconButton } from "@zentara-co/zenos-ui"; function ProjectActions() { return ( <> ); } ``` Use `startIcon` or `endIcon` for [Button](/components/button/) labels, and place the icon inside [IconButton](/components/icon-button/) for icon-only actions. ## Weights Phosphor supports six weights. Start with `regular` for everyday interface icons and keep the treatment consistent across a feature. A filled icon can distinguish a selected or saved state, but should not be the only indication of that state. ```tsx import { StarIcon } from "@phosphor-icons/react";