On this page
Installation
Configure StyleX once, check your build, then add your first component.
Set up Yopem UI once per project. After these checks, continue with Getting started to choose a component.
Before you start
Use an existing React and TypeScript project with one of these frameworks:
- Vite React
- React Router with Vite, in client mode or framework mode
- TanStack Router or TanStack Start
- Next.js App Router
- Astro
Next.js requires Node 24 or later and webpack. The CLI does not support Next.js Pages Router, React Router RSC mode, or other build tools.
1. Run init
Run this command from your project root. Yopem UI supports Bun, npm, pnpm, and Yarn 2 or later.
The CLI detects your framework and installs shared source, StyleX dependencies,
and the Oxlint plugin. It configures the @/* alias, build plugins, and root
styles. Vite integrations use Rolldown Babel.
The command keeps existing project code. If configuration conflicts with required settings or is unsupported, it stops with an error instead of overwriting that configuration.
If your project has multiple frameworks
Select the framework explicitly:
Accepted values are vite, react-router, tanstack-router, tanstack-start,
next, and astro. The CLI detects React Router client mode from
react-router or react-router-dom. It detects framework mode from
@react-router/dev.
2. Check global styles
Import the installed styles.css once from your application root. Its reset
sets box-sizing: border-box and min-inline-size: 0 for elements and
pseudo-elements. It also supplies Heading sizes. Use xstyle to override these
defaults. Load Geist Sans and Geist Mono in your app to use the default font
families. The CLI does not install fonts. You can configure other font tokens.
3. Check your build
Run your project's production build. StyleX compiles styles during the build; installing its runtime package alone is not enough. Fix any StyleX or CSS extraction errors before adding components.
Run Oxlint from your project root:
See the lint rules for configuration.
Add your first component
Browse Components and choose what your app needs. Each component page includes its install command and usage examples.
See Getting started for the install and usage steps.
For more CLI options, see the CLI guide. The default registry is
https://ui.yopem.com/r. The CLI records installed files in ui.json.
Theme switching is optional. Static light mode does not need a provider. See Theming for dark mode, custom themes, and CSP nonces.