0.2 RC Trial
Verify the Proto UI onboarding flow with the exact 0.2.0-rc.1 release
:::caution[Prerelease trial] 0.2.0-rc.1 is now available from npm. Trial findings are not stable-version promises, and commands or generated structure may still change before 0.2.0. :::
Install the Proto UI CLI
Section titled “Install the Proto UI CLI”You can use the Proto UI CLI directly with npx. There is no need to install it globally in advance. This page pins 0.2.0-rc.1 so trial results remain reproducible; the CLI pins Adapter and Prototype packages to its own exact version so historical release trains cannot be mixed in.
npx @proto.ui/cli@0.2.0-rc.1 --helpInitialize your project
Section titled “Initialize your project”Run this in your project root:
npx @proto.ui/cli@0.2.0-rc.1 initAfter initialization, a proto-ui/ folder will be created at the project root.
A typical structure looks like this:
your-project/├── src/├── proto-ui/│ ├── adapters/│ ├── prototypes/│ ├── components/│ │ ├── react/│ │ │ └── index.ts│ │ └── index.ts│ └── config.json├── package.json└── ...Where:
config.json: project configuration read by later CLI commandscomponents/: generated component entries you import from your appadapters/andprototypes/: CLI-managed areas, not user-facing import surfaces
You usually do not need to maintain these files manually. The CLI manages them for you.
Import the styles
Section titled “Import the styles”init generates Proto UI style preset files by default. Import the generated stylesheet once from your app entry:
import './styles/proto-ui-style.css';Adjust the relative path if your app entry is not next to src/styles.
The generated Shadcn theme follows the system prefers-color-scheme when the application has not declared a theme. If the application manages its own theme, set data-theme="light" / data-theme="dark" on the root element, or use the compatible .light / .dark classes. An explicit theme overrides the system preference.
Add a component
Section titled “Add a component”Once initialization is done, you can install Proto UI components one component at a time.
For example, to add a shadcn-button in a React project:
npx @proto.ui/cli@0.2.0-rc.1 add react shadcn-buttonThis command will:
- Detect the host adapter you selected (
react) - Check that the React runtime exists in your project
- Install the corresponding adapter and prototype packages
- Assemble everything locally
- Generate a component entry point that your current project can use directly
If you want to inspect what will be generated without letting the CLI install dependencies, run:
npx @proto.ui/cli@0.2.0-rc.1 add react shadcn-button --no-installThis prints the Proto UI packages you still need to install and still generates the local component entry.
Use it in your project
Section titled “Use it in your project”After installation, import the component from the generated host entry:
import { ShadcnButton } from '../proto-ui/components/react';
export function Demo() { return <ShadcnButton>Click me</ShadcnButton>;}The generated component preserves the Prototype’s declared props, event listeners, and ref/expose surface. In a TypeScript project, supported values such as variant="outline" receive completion while invalid variants and unknown props are rejected by the type checker.
The relative import is intentional. Projects do not share the same path aliases or directory depth, so the CLI does not assume that a bare specifier such as proto-ui/components is already configured.
Keep adding more components
Section titled “Keep adding more components”Proto UI is adopted one component at a time.
You can continue with commands like:
npx @proto.ui/cli@0.2.0-rc.1 add react shadcn-togglenpx @proto.ui/cli@0.2.0-rc.1 add react shadcn-dialogThen keep using them from the same host entry:
import { ShadcnButton, ShadcnDialogRoot, ShadcnToggle } from '../proto-ui/components/react';Use multiple hosts
Section titled “Use multiple hosts”If the same project needs both React and Web Components, add them separately:
npx @proto.ui/cli@0.2.0-rc.1 add react shadcn-buttonnpx @proto.ui/cli@0.2.0-rc.1 add wc shadcn-buttonReact components are exported from the React host entry:
import { ShadcnButton } from '../proto-ui/components/react';Web Component constructors are exported from the Web Component host entry:
import { ShadcnButtonElement } from '../proto-ui/components/wc';proto-ui/components/index.ts also re-exports host-prefixed or explicit names to avoid naming conflicts when multiple hosts are used in the same project.
It does not ask you to migrate your whole project at once
Section titled “It does not ask you to migrate your whole project at once”You can use Proto UI only in new features, or replace just one or two components in an existing project.
A more common way to start is:
- Initialize Proto UI first
- Install the simplest component first, such as Button
- Try it in one local page or feature
- Then decide whether to keep expanding
Current boundary
Section titled “Current boundary”The current CLI onboarding path installs official prototype packages and generates local component facades.
It does not yet write shadcn styled prototype source into your project for direct editing. That direction is already planned, but it is not part of the first v0 onboarding path.
If you want to understand the most basic model behind it:
- Go to How It Works
If you want to decide whether it is worth introducing:
- Go to Why Proto UI
If you want to learn more about its underlying principles and boundaries:
- Go to Whitepaper