vi studio

Learn Vi: build real mobile apps

36 short lessons, from your first screen to timers, sound, several screens and store builds. No experience needed: Vi reads almost like a description of the screen, and turns it into a real React Native app.

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.

Getting started

  1. Welcome to ViWhat Vi is and how Vi Studio works.
  2. Vi in five minutesContainers, data, functions and layout in four small apps.
  3. Your first appA complete counter app, line by line.
  4. Projects and templatesNew Project, Create blank project, and how a project is laid out.

The language

  1. Comments and names# comments, <# blocks #> and snake_case names.
  2. ContainersEverything on screen is a container; children one per line.
  3. Size and spacesize out of 100, and space_inside / between / around.
  4. Arrange and placeDirection, spot and spread; floating with place.
  5. Texttext and text_style.
  6. Colour, shape and imagesColours and shades, shape, shadow, see_through, outline, @images.
  7. Buttons, inputs and other kindsbutton, input, search, icon, link and scrolling lists.
  8. Eventson_tap, on_hold, on_touch, on_swipe, on_change, on_submit, on_hit.
  9. Data: lists and objectsVariables, lists, objects and the list helpers.
  10. FunctionsYour own functions and the built-in ones.
  11. Conditions and loopsif / else, the inline if, and, or, not, for and while.
  12. Programs without a screenmain functions and print().

Building apps

  1. Screensgo_to, go_back, transitions, and phone / tablet / desktop.
  2. Containers that take valuescard(task): one container, many values.
  3. Repeating thingsrepeat: task in tasks, grids, index, x, y and .at().
  4. Reaching other containersInside names, parent.name and top-level names.
  5. Changing the screenA dot for one change, a block for several; wait and animate.
  6. Timers and gamesevery(), stop(), on_touch, place: x, y and on_hit.
  7. Sound and videoplay, loop, stop_sounds, audio and video.
  8. Files and projectssrc/, every file sees every name, one name in one file.
  9. The config blockApp name, store id, version, icon and splash screen.
  10. Errors and good habitsThe real error messages and their fixes; how to organise a project.

Vi Studio

  1. Inspect, move and lay outFind a container’s code, drag it somewhere else, set its layout.
  2. Build for Android and iOSStore builds and test builds in Expo’s cloud.
  3. Source Control (Git)Commits, diffs and publishing to GitHub.
  4. The AssistantA local AI helper that proposes edits you can apply.

Examples

  1. Example: counterA tally with a goal, split into files.
  2. Example: to-do appLists, inputs, repeat and an empty state.
  3. Example: tic-tac-toeA two-player game with a 3×3 grid and a scoreboard.
  4. Example: Comet GlideA tap-to-fly arcade game with every() and place.

Reference

  1. Cheat sheetThe whole language on one page.
  2. ReferenceEvery attribute, event, built-in and keyword.