Lessons · Getting started · 1 of 36
Welcome to Vi
What Vi is and how Vi Studio works.
Vi is a small language for building app screens. You describe what you want — boxes, text, buttons and the data behind them — almost in plain English, and Vi turns it into a real React Native app that runs on Android, iOS and the web.
Vi is for everyone who has an app idea, students most of all. Vi Studio runs on a computer, in a
web browser and on your phone, and each of them builds real apps: you can write one on your phone
and watch it run right there. When you grow past what Vi has, the whole React Native world is
still open to you: a .tsx file in your project joins the app.
How Vi Studio works
- New Project (or Create blank project in an empty folder) gives you a small app
to start from:
src/main.vifor the app,src/config.vifor its name and icon. - Write Vi in the editor on the left. The phone on the right updates as you type.
- Every example in these lessons has a Try it button: it runs in the phone, and you can change it.
- Turn on Inspect (the target icon above the phone) and click anything on the phone to jump to its code.
- Press the QR button and scan it with Expo Go to run the app on your own phone.
- Problems show up as red underlines and in the Problems tab, most with a Fix button.
The whole idea in one example
count = 0
main app:
arrange: center
space_between: 16
children:
display:
text: "Count: {count}"
text_style: 32
plus:
button: "+"
on_tap: count = count + 1
Three ideas carry the whole language:
- Containers (
display:,plus:) are the things on screen, described withattribute: valuelines. - Variables (
count = 0) hold your data. When they change, the screen redraws by itself. - Functions do the work, usually in response to an event like
on_tap.
Continue with Vi in five minutes.
Every example here runs in Vi Studio: open it in your browser (phones too) and press Start learning on the welcome page. Each code block there has a Try it button that runs it in the phone preview.
More in Getting started
- Vi in five minutesContainers, data, functions and layout in four small apps.
- Your first appA complete counter app, line by line.
- Projects and templatesNew Project, Create blank project, and how a project is laid out.
About Vi. Vi is a free, open-source programming language for building real mobile apps. You describe each screen in plain words, and Vi compiles it to React Native (Expo) for Android, iOS and the web. Its editor, Vi Studio, runs on Windows, in any browser and on your phone, with the app running live as you type. Read more about Vi.