suiss/ui
  • Docs
  • Components
  • Patterns
  • Interactions
  • Charts
  • Blocks
  • AI
GitHubCreate
DocsComponentsPatternsInteractionsChartsBlocksAICreate
Docs5
Get Started
  • Introduction
  • Installation
  • Theming
  • CLI
  • MCP Server

suiss/ui

CLI

The @esuiss/ui command sets up your project and copies components, patterns, charts and blocks into it for React, React Native, SwiftUI and Compose.

Overview

@esuiss/ui runs with npx and is never installed in your project. It has three commands: init sets up a project, apply restyles it and add copies components into it. It detects the project in the current folder: a Next.js or Vite app gets React components, an Expo or React Native app gets React Native components, an Xcode project or Swift package gets SwiftUI views and an Android Gradle module gets Jetpack Compose composables.

Registry CLI

Every React, React Native, SwiftUI and Compose item is also published as a registry under the @esuiss namespace, so any project with a components.json can add it with the registry CLI instead. The item names are the same, without the group:

$ pnpm dlx shadcn@latest add @esuiss/button$ pnpm dlx shadcn@latest add @esuiss/date-picker @esuiss/area-chart-default

For React, files land in the same folders as below, icons follow the icon library in components.json, and the style there picks the primitive base. See Installation. For the other platforms the style picks the platform and the style, such as rn-uniwind-suiss, swift-suiss or kotlin-suiss; the Installation page of each platform has the components.json to use. The registry CLI only copies files and installs npm packages: it prints the Swift packages and Gradle dependencies a SwiftUI or Compose item needs, and leaves preset fonts and icon library switching to @esuiss/ui.

init

Sets up Tailwind CSS, the @/* import alias, the theme stylesheet, the font, the animation and variant stylesheets and the button component. See Installation for every step.

$ pnpm dlx @esuiss/ui@latest init [options]

New project

--template creates the app in a new folder with the official creator, then sets it up. The creator runs through the package manager that runs the CLI: npx, pnpm dlx, yarn dlx or bunx.

$ pnpm dlx @esuiss/ui@latest init --template next --name my-app

next runs create-next-app (TypeScript, Tailwind CSS, App Router, src/), vite runs create-vite with react-ts, expo runs create-expo-app with blank-typescript, and react-native runs the React Native Community CLI init for a bare React Native app, without CocoaPods or git. That CLI cannot install with pnpm, so with pnpm the packages are installed after the app is created. TanStack Start, React Router, Astro and Laravel templates and --monorepo are not available yet: create those apps yourself and run init in them. SwiftUI and Compose apps start in Xcode or Android Studio.

OptionDescription
-o, --overwriteReplace a local button that differs from the registry
-y, --yesSkip confirmation prompts
-b, --base <base|radix|aria>Primitive base of React components, read from the style in components.json when omitted, otherwise base. Saved as the style in components.json
--style <name>Visual style: suiss (the default), vega, nova, maia, lyra, mira, luma, sera or rhea. For React it is saved as the style in components.json; for React Native, SwiftUI and Compose it picks the theme or tokens file
--preset <code>A preset code from Create: style, colors, radius, fonts, icon library and menus. React Native, SwiftUI and Compose apply it to their theme files; see Theming
--theme suissKeep the suiss/ui grays when applying a preset; a colored theme in the preset still sets the primary, chart and accent colors
--primary <color>A custom primary color as hex (#2563eb), rgb(37 99 235) or oklch(0.55 0.2 260). Replaces the primary, its foreground (white or near-black, whichever contrasts more), the focus ring, the sidebar primary and ring, and chart-1 in light and dark, after any preset, on every platform
--icon-library <name>Icons of React Native, SwiftUI and Compose components: phosphor (the default), lucide, tabler, hugeicons or remixicon. Read from --preset or the installed icons file when omitted
-t, --template <next|vite|expo|react-native>Create a Next.js, Vite, Expo or React Native app in a new folder first
-n, --name <name>The folder of the new app, <template>-app by default
--pointerReact only: show the pointer cursor on enabled buttons
--rtlReact only: the components use logical properties and already work right to left; set dir="rtl" on <html>
-p, --platform <web|rn|swift|kotlin>Pick the platform when the folder holds more than one project
-s, --styling <uniwind|nativewind|stylesheet>React Native styling, detected from the project when omitted
--path <dir>Where SwiftUI or Compose files go, relative to the project, EsuissUI/ or src/main/kotlin/com/esuiss/ui/ by default
-c, --cwd <dir>Run in another project directory
-h, --helpShow help for init
-v, --versionShow the version

apply

Restyles a project that already ran init, on every platform.

$ pnpm dlx @esuiss/ui@latest apply --preset <code> [--only theme|font] [options]

Without --only, React applies the colors, radius, font, style, icon library and menu colors of the preset, saves them in components.json and reinstalls the installed components in the new style after asking, since local changes to them are replaced. When it cannot ask, because there is no terminal and no --yes, it stops before changing any file. --only theme keeps the style unless --style is given and saves the base color in components.json. The colors and radius start again from the suiss/ui values, so a preset with the suiss colors or the default radius undoes an earlier one. React Native, SwiftUI and Compose rewrite their theme files and fonts, and switch the icons of installed components to the icon library of the preset.

OptionDescription
--preset <code>A preset code from Create
--only <theme|font>Apply only the colors and radius, or only the fonts
--primary <color>A custom primary color, on its own or over the preset
--theme suissKeep the suiss/ui grays when applying a preset; a colored theme in the preset still sets the primary, chart and accent colors
--style <name>Change the visual style; not with --only font
--pointerReact only: show the pointer cursor on enabled buttons
--rtlReact only: print how to run the components right to left
-y, --yesRestyle installed components without asking
-p, --platform <web|rn|swift|kotlin>Pick the platform when the folder holds more than one project
-s, --styling <uniwind|nativewind|stylesheet>React Native styling, detected from the project when omitted
--path <dir>Where the SwiftUI or Compose theme files are, relative to the project, EsuissUI/ or src/main/kotlin/com/esuiss/ui/ by default
-c, --cwd <dir>Run in another project directory
-h, --helpShow help for apply
-v, --versionShow the version

apply needs at least one of --preset, --primary, --style or --pointer. --template, --name, --base and --icon-library work with init.

add

Copies components into your project, together with the components and npm packages they depend on.

$ pnpm dlx @esuiss/ui@latest add$ pnpm dlx @esuiss/ui@latest add <component...> [options]$ pnpm dlx @esuiss/ui@latest add patterns <pattern...> [options]$ pnpm dlx @esuiss/ui@latest add interactions <interaction...> [options]$ pnpm dlx @esuiss/ui@latest add charts <chart...> [options]$ pnpm dlx @esuiss/ui@latest add blocks <block...> [options]
OptionDescription
-o, --overwriteReplace local files that differ from the registry, including the components they depend on
--diffShow how your local files differ from the registry, for every file --overwrite would replace
-a, --allAdd every component except theme, or every pattern, interaction, chart or block with add patterns, add interactions, add charts or add blocks
-y, --yesSkip confirmation prompts and the pick list
-b, --base <base|radix|aria>Primitive base of React components, read from the style in components.json when omitted, otherwise base
--icon-library <name>Icons of React Native, SwiftUI and Compose components: phosphor (the default), lucide, tabler, hugeicons or remixicon. Read from --preset or the installed icons file when omitted
-p, --platform <web|rn|swift|kotlin>Pick the platform when the folder holds more than one project
-s, --styling <uniwind|nativewind|stylesheet>React Native styling, detected from the project when omitted
--path <dir>Where SwiftUI or Compose files go, relative to the project, EsuissUI/ or src/main/kotlin/com/esuiss/ui/ by default
-c, --cwd <dir>Run in another project directory
-h, --helpShow help for add
-v, --versionShow the version

add keeps the style and preset that init or apply set up, so --style, --preset, --primary, --theme, --template, --name, --rtl, --pointer and --only are rejected here.

Pick from a list

Run add without names to pick from a list. Choose components, patterns, interactions, charts or blocks, type to filter, select with space and press enter. add patterns, or another group, without names opens the list for that group.

$ pnpm dlx @esuiss/ui@latest add$ pnpm dlx @esuiss/ui@latest add patterns

The groups work the same in React Native, SwiftUI and Jetpack Compose projects, and --all adds every item of the group. In SwiftUI and Jetpack Compose projects the list only shows what exists for that platform:

$ pnpm dlx @esuiss/ui@latest add --platform swift

Outside an interactive terminal, such as in CI, add without names prints the available names instead.

Patterns

Patterns combine several components into one ready-made piece, such as a date picker. The components a pattern uses are added with it.

$ pnpm dlx @esuiss/ui add patterns date-picker$ pnpm dlx @esuiss/ui add patterns --all

Interactions

Interactions add a behavior to something you already have, such as swiping a row to reveal actions. The components an interaction uses are added with it.

$ pnpm dlx @esuiss/ui add interactions swipe-actions$ pnpm dlx @esuiss/ui add interactions --all

Charts

Charts are ready-made charts built on the chart component. The chart component and anything else a chart uses are added with it.

$ pnpm dlx @esuiss/ui add charts <name>$ pnpm dlx @esuiss/ui add charts --all

Blocks

Blocks are ready-made sections of a page built from the components. The components a block uses are added with it.

$ pnpm dlx @esuiss/ui add blocks <name>$ pnpm dlx @esuiss/ui add blocks --all

Note

Patterns, interactions, charts and blocks are optional extras. Neither init nor add --all adds them; add them by name, or all at once with --all.

Primitive base

React components come with three primitive bases. init and add use the default base, base, unless the style in components.json is radix-*, new-york or default, which uses radix, or aria-*, which uses aria. init --base saves the base as the style in components.json, creating the file when needed, so later add runs use it. --base on add overrides it for that run:

$ pnpm dlx @esuiss/ui@latest init --base radix$ pnpm dlx @esuiss/ui@latest add sidebar --base radix$ pnpm dlx @esuiss/ui@latest init --base aria

The files, folders and names are the same for all three. See Installation.

Styles

Every platform comes in nine styles: suiss (the default), vega, nova, maia, lyra, mira, luma, sera and rhea. For React the style is the part of the style in components.json after the base, such as base-suiss or radix-nova; add writes components in that style, apply --style switches it and reinstalls the installed components, and the registry serves the same style to npx shadcn@latest add. For React Native, SwiftUI and Compose, init copies the theme or tokens file of the style:

$ pnpm dlx @esuiss/ui@latest init --style nova$ pnpm dlx @esuiss/ui@latest apply --style vega$ pnpm dlx @esuiss/ui@latest init --platform swift --style luma

Pick a style, colors, radius and icons on the Create page, then run the command it shows. init --preset applies the code, loads its font (with next/font/google in Next.js and a Fontsource package in Vite) and saves the style, iconLibrary, menuColor and menuAccent in components.json, so later add runs follow them. A bold menu accent highlights menu items with the primary color. With --platform rn, swift or kotlin, init --preset writes the colors, radius, menu colors and fonts into the theme files instead. A preset whose theme is a different gray than its base color is rejected; use the base color itself or a colored theme. The gray base color is not available.

Icon libraries

React components follow the iconLibrary in components.json. React Native, SwiftUI and Compose components ship with Phosphor and switch to another library when you pass --icon-library or a preset code:

$ pnpm dlx @esuiss/ui@latest init --platform rn --icon-library lucide$ pnpm dlx @esuiss/ui@latest add dialog --platform swift --icon-library tabler

The CLI rewrites the icon imports of every file it adds and writes one icons file next to the components. Later add runs read the library back from that file. apply --preset, or add with a different --icon-library, switches the installed components and the icons file to the new library.

LibraryReact NativeSwiftUI and Compose
Phosphorphosphor-react-nativephosphor-icons/swift and com.adamglin:phosphor-icon-android
Lucidelucide-react-native, wrapped in components/ui/icons.tsxGenerated from Lucide's SVG data
Tabler@tabler/icons-react-native, wrapped in components/ui/icons.tsxGenerated from Tabler's SVG data
Hugeicons@hugeicons/react-native with @hugeicons/core-free-iconsGenerated from the free Hugeicons set
RemixPaths drawn with react-native-svg in components/ui/icons.tsxGenerated from Remix's SVG data

SwiftUI gets Icons/EsuissIcons.swift and Compose gets the icons/ package, holding only the icons the components use, so neither needs an icon package. Icon weights map to stroke widths, and fill uses the filled icon where the library has one.

Where files are written

Paths are relative to your @/* alias root.

KindDirectory
Componentscomponents/ui/
Hookshooks/
Patternscomponents/patterns/
Interactionscomponents/interactions/
Chartscomponents/charts/
Blockscomponents/blocks/

In React Native projects the same folders are used. SwiftUI files go to EsuissUI/, or to Sources/<Target>/EsuissUI/ in a Swift package, and Compose files go to src/main/kotlin/com/esuiss/ui/ in your app module. In a Swift package with several targets, pick the target from the list or pass --path. The CLI prints the folder it writes to, and --path chooses another one.

Missing npm packages are installed with your package manager: npm, pnpm, yarn or bun. The packageManager field in package.json decides, then the package manager that runs the CLI (pnpm dlx, yarn dlx or bunx), then the lockfile of the project or its workspace. In Expo projects they are installed with expo install, so native modules match the Expo SDK. The CLI never edits Xcode or Gradle files: it lists the Swift packages and Gradle dependencies a SwiftUI or Compose component needs.

NextMCP ServerPreviousTheming

On this page

  1. 01Overview
  2. 02Registry CLI
  3. 03init
    • New project
  4. 04apply
  5. 05add
    • Pick from a list
    • Patterns
    • Interactions
    • Charts
    • Blocks
  6. 06Primitive base
  7. 07Styles
  8. 08Icon libraries
  9. 09Where files are written