Getting Started

On this page

The following will show you how to get up and running with the ui editor from scratch.

If you prefer video format, here’s an in-depth walkthrough of using the UI editor to create and edit a new app.

Pre-reqs

Running

New app

If you set the argument app_loc to a location that does not yet exist, the will start in a template-chooser interface. Here you can select a complete app template which will then be written to your app_loc and then be edited as an existing app would be.

shinyuieditor::launch_editor(app_loc = "new-app/")

There are just a few templates available currently but more are always being added.

Existing app

Assuming there’s an existing app (as a single-file app.R) in the folder existing-app/ relative to your current working directly (getwd()), then you start the ui-editor on that app by running the following code and pasting the returned link into your web-browser.

shinyuieditor::launch_editor(app_loc = "existing-app/")
#> Live editor running at http://localhost:44509/app

Editing your app

Once you’re in the editor, any changes you make will automatically be written to your app’s UI and the changes can be seen in real-time with the “App Preview” window.

For more info on how to perform various tasks with the editor, see the How To.

Saving/Closing editor

When you’re done, simply close the browser window (or press {control/command}-c in the console) to stop the editor preview process in R. Since all changes are eagerly applied there’s no need to save.

Written on: 25 Sep 2023 by Nick Strayer