💡
Prerequisites: You'll need Node.js 18+ and npm or yarn installed on your machine.

1. Install the CLI

Webui provides a powerful command-line interface to scaffold and manage your projects. Install it globally using npm:

Terminal
1
npm install -g @webui/cli

2. Create a New Project

Scaffold a new Webui project in a single command. This will set up the directory structure, install dependencies, and configure the development server.

Terminal
1
npx webui init my-awesome-app

This will create a directory called my-awesome-app with the following structure:

Project Tree
1 2 3 4 5 6 7 8
my-awesome-app/
├── public/
├── src/
│   ├── components/
│   ├── styles/
│   └── App.webui
├── webui.config.js
├── package.json
└── README.md

3. Run Locally

Navigate into your project directory and start the development server. Webui includes a hot-reloading dev server so you can see changes instantly.

Terminal
1 2
cd my-awesome-app
npm run dev

Visit http://localhost:3000 in your browser to see your application.

4. Your First Component

Webui uses a declarative syntax for building UI components. Open src/App.webui and replace the content with the following:

App.webui
1 2 3 4 5 6 7 8 9 10
import { Card, Button } from '@webui/core';

export default function Home() {
  return (
    <Card variant="elevated" padding="lg">
      <h1>Welcome to Webui</h1>
      <p>Your new interface is ready.</p>
      <Button onClick=handleDeploy>Get Started</Button>
    </Card>
  );
}
🚀
Tip: Webui automatically handles responsive breakpoints. Try resizing your browser window!

Next Steps

Now that you have a working project, here are some recommended next steps to dive deeper:

← Introduction Project Structure →