Retool Mobile quickstart
Learn about the fundamental concepts of Retool Mobile.
This guide serves as an introduction to Retool mobile apps. It covers many of the concepts and terminology you would come across as you build mobile apps. After reading this page, you should have a good understanding of the fundamentals for building Retool mobile apps.
Introduction
A Retool Mobile app is a mobile application that interacts with your data sources. You assemble the user interface using components, such as input fields and tables. Mobile apps also use the concept of screens to create multiple views—similar to pages, such as display a list of contacts and then selecting one for which to view details. You also write code that interacts with data, transforms values, control behavior, and more.
Mobile apps run natively on iOS and Android using the Retool Mobile app.
Retool officially supports the latest stable releases of the following desktop web browsers:
Editing apps in alternative browsers, on mobile devices, or using beta and nightly builds is not officially supported.
Mobile app UI
The user interface of a mobile app is made up of components and screens.
Components
These are interface elements, such as a text input field, with which users interact. Components are objects with internal state. Retool exposes properties, methods, and events with which you can interact.
Property values change as you configure or interact with components. For example, the List Collection component's selectedItem
property changes whenever a user selects an item from the list.
Screens
Screens group components together into distinct views, similar to application windows. Users navigate between screens using the tab bar or by interactions that trigger event handlers, such as pressing a button or selecting an item from a list.
Screens also function as modals and sheets, providing a number of ways for which users can interact.
Assemble components and screens
You build mobile apps using the App IDE for Retool Mobile, Retool's drag-and-drop app building web interface. You use the App IDE to:
- Visually assemble the mobile app interface.
- Write queries to interact with data.
- Configure actions based on user interactions.
- Share apps directly with users.
Connect components together
Most component properties are editable. You configure them in the IDE with either static values (string
, number
, boolean
, array
, and object
) or reference other component values using {{ }}
embedded expressions, similar to the use of template literals.
You reference property values using dot notation. For instance, you can select an item from the inventory list to get more details. The Image component value is set to {{ itemCollection.selectedItem.image }}
, which updates whenever you change the selection.
Use JavaScript expressions for values
Retool performs string interpolation and evaluates {{ }}
embedded expressions as JavaScript. As a result, you can write JavaScript code—that evaluates and returns a value synchronously—almost anywhere. This enables you to dynamically set property values using transformations or conditional logic to build complex apps.
The List Collection component uses a ternary operator and the selected value of the Segmented Control mobile component to toggle sorting the list by quantity or price.
{{
sortOptions.value === 'quantity'
? getItems.data.sort((a, b) => b.quantity - a.quantity)
: getItems.data.sort((a, b) => b.price - a.price)
}}
Connect your data using resources
A resource is a saved set of user-configured properties that determines how Retool connects to a data source, such as a PostgreSQL database or REST API. You create a resource for each data source you want to use with Retool, then write queries to interact with them.
Each resource has configuration options that Retool uses when interacting with a data source. This simplifies how you query data sources while ensuring access is secure.
When a resource query is run, Retool proxies the request to the data source, server-side, using the resource's configuration settings. This means only Retool directly connects to a data source, not your users.