Skip to content
UI
On this page

Add your first component

Set up your project, choose a component, and use it in your app.

Yopem UI copies component source into your React and TypeScript project. You can edit those files directly. There is no runtime component package.

Set up your project once. Then choose the components your app needs.

1. Set up your project

Follow the installation guide to configure StyleX for your framework. It covers supported projects, the init command, and build checks. Return here when your app completes a production build.

If you already completed installation, choose a component below. You do not need to run init again.

2. Choose a component

Browse Components and open the component you want. Each page has an install command, live previews, and usage examples.

Run its install command from your project root. For example, if you choose Button:

The CLI copies the selected component source and installs its dependencies.

3. Use your component

Copy a usage example from the component page into your app. Import from the local file that the CLI installed. The init command maps @/* to src/*.

For Button, a usage example looks like this:

src/components/save-button.tsx

Render SaveButton on a page in your app. Check its padding, border, and hover state. Press Tab to check that the keyboard focus ring is visible.

If styles are missing, return to the installation checks.

Customize when needed

Check your component's documentation for variants and props. For a local style change, pass xstyle. This Button example changes its border radius:

src/components/save-button.tsx

Use tokens to change styles throughout your app. Edit the copied source when you need to change behavior. Keep accessible names, keyboard behavior, disabled states, and focus indicators.

Next steps