# Screens

## Overview&#x20;

In mobile app development, each screen represents a distinct interface within an app and serves as the canvas upon which the app's functionality is presented.&#x20;

We recommend you spend some time sketching out or wireframing your app vision. This will ensure you have a good understanding of how many screens you need and how users will navigate between them.

## Add a Screen to Your Project

There are two ways to add a new screen to your app.

A. Click the **+** icon next to your screen names in the screens bar.

<figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FsWtPFHw0eG3lzMoqel4B%2FScreenshot%202024-10-24%20151930.png?alt=media&#x26;token=fc1f6952-b060-4181-9dde-50bd78ea2ab3" alt=""><figcaption></figcaption></figure>

B. Click the **Create** **New Screen** icon at the top of your component tree.&#x20;

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FPnjVKsQNE8cFXk3mVsQc%2Fnew%20screen.png?alt=media&#x26;token=1c72158a-fe91-4cd0-910a-eb966ece41b7" alt=""><figcaption></figcaption></figure></div>

## Duplicate Screens&#x20;

Once you’ve perfected the design of a screen on the Design tab of a drag and drop project, you can duplicate it using copy-and-paste keyboard shortcuts.&#x20;

To duplicate a screen within a project:&#x20;

1. Select the screen in the Designer.
2. Click the vertical ellipsis at the top of the screen's properties pane.
3. Click **Duplicate**.

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2F18WUMHTuiPEphudgInI2%2Fimage.png?alt=media&#x26;token=fb4f13c5-d8e6-4413-aec3-42812b89434e" alt="" width="349"><figcaption></figcaption></figure></div>

Another way to do it:

1. Click on a screen name in the component tree (A) or the screen itself within your workspace (B).

   <figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FnwIRiPOajymeyGX99dxm%2Fscreen%20ab.png?alt=media&#x26;token=af2fb94e-e716-4353-80eb-499f72efb79b" alt=""><figcaption></figcaption></figure>
2. Type **ctrl+c** or **command+c** on Mac, or **ctrl+c** on PC, to copy the screen.&#x20;
3. Type **ctrl+v** or **command+v** on Mac, or **ctrl+v** on PC, to paste a duplicate of the screen.
4. The new screen will be added to the right of the existing screen.

{% hint style="info" %}
Creators on certain Thunkable plans can also save screens to reuse in other projects. You can learn more here: [Save and Reuse Screens](https://docs.thunkable.com/app-design/screen/save-and-reuse-screens).
{% endhint %}

## Screen Properties

### Screen

<table><thead><tr><th width="214.33333333333331">Property</th><th width="198">Value</th><th>Description</th></tr></thead><tbody><tr><td>Scrollable</td><td>True/False</td><td>Allow the user to scroll on this screen.</td></tr><tr><td>Background Color</td><td>Color</td><td>Set the screen's background color.</td></tr><tr><td>Background Image</td><td>Image</td><td>Upload an image to be displayed in the screen's background. Accepted formats: PNG, JPG, GIF, SVG, etc., or a URL that ends in a file extension (e.g.  <a href="https://thunkable.com/static/media/logo.ba96eb83.png">https://thunkable.com/static/media/logo.ba96eb83.png</a>)</td></tr><tr><td>Background Image Resize Mode</td><td>cover, contain, stretch, repeat, or center</td><td>Set how the background image is shown if the image file and the screen have different dimensions/aspect ratios. See <a href="#picture-resize-mode">Picture Resize Mode</a> below. </td></tr><tr><td>Orientation (iOS and Android only)</td><td>portrait, landscape, or auto</td><td>Define the screen's orientation.</td></tr></tbody></table>

#### Picture Resize Mode

* **Center:** The image is displayed at its original size within the container, and it is centered both vertically and horizontally. This means that if the image is larger than the container, parts of it may extend beyond the container's edges.
* **Cover:** The image is resized to completely cover the container while maintaining its aspect ratio. This mode ensures that the entire container is filled with the image, and any excess image parts are cropped if necessary. This can result in parts of the image being clipped.
* **Contain:** The image is resized to fit entirely within the container while maintaining its aspect ratio. This mode ensures that the entire image is visible within the container, and it may result in empty space around the image if the container's aspect ratio differs from the image's aspect ratio.
* **Repeat:** The image is tiled or repeated to fill the entire container, both horizontally and vertically. This mode is often used for creating patterns or backgrounds that seamlessly repeat across the container.
* **Stretch:** The image is resized to fully cover the container without maintaining its original aspect ratio. This can distort the image and may result in an unnatural appearance, so it's generally not recommended for most scenarios.

### Video Tutorial

#### How to Save and Reuse Thunkable Screens

In this tutorial, you’ll learn how to create scrollable screens, which allow users to access a large amount of content within a confined screen space.

{% embed url="<https://www.youtube.com/watch?v=PR9_P86-25s>" %}

### Screen-Specific Navigator Properties

Screens within a navigator have an additional section in the screen's properties panel for navigation options. You can learn more about these properties in the navigator docs.

{% content-ref url="screens-and-navigators/top-tab-navigator" %}
[top-tab-navigator](https://docs.thunkable.com/app-design/screens-and-navigators/top-tab-navigator)
{% endcontent-ref %}

{% content-ref url="screens-and-navigators/bottom-tab-navigator" %}
[bottom-tab-navigator](https://docs.thunkable.com/app-design/screens-and-navigators/bottom-tab-navigator)
{% endcontent-ref %}

{% content-ref url="screens-and-navigators/drawer-navigator" %}
[drawer-navigator](https://docs.thunkable.com/app-design/screens-and-navigators/drawer-navigator)
{% endcontent-ref %}

{% content-ref url="screens-and-navigators/stack-navigator" %}
[stack-navigator](https://docs.thunkable.com/app-design/screens-and-navigators/stack-navigator)
{% endcontent-ref %}

### Status Bar

The status bar is located at the top of a phone's screen. The status bar displays information regarding signal strength, battery, and whether or not things like the alarm or Wi-Fi are enabled.

<table><thead><tr><th width="214.33333333333331">Property</th><th width="198">Value</th><th>Description</th></tr></thead><tbody><tr><td>Visibility</td><td>True/False</td><td>Set whether or not you want the status bar visible on the screen.</td></tr><tr><td>Style</td><td>default, light-content, or dark-content</td><td>Set whether the the app's appearance should be light or dark, or follow the device's settings (default). Default is recommended.</td></tr><tr><td>Color (Android only)</td><td>Color</td><td>Set the color of the status bar.</td></tr><tr><td>Translucent (Android only)</td><td>True/False</td><td>Set the translucency of the status bar. When set to true, the app's content behind the status bar is partially visible, giving the impression that the status bar is overlaid on top of the underlying screen content rather than fully opaque. </td></tr></tbody></table>

## Screen Blocks

To access the blocks specific to a screen:

1. Navigate to the **Blocks** tab.
2. In the component tree on the left, click the name of the screen.
3. A drawer of screen-specific blocks opens.

### Event Blocks

#### When Screen Opens

This event fires **anytime** the screen is opened.

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FWEezBOhpot3hR471ELXt%2Fwhen%20screen%20opens.png?alt=media&#x26;token=9ea6572f-fa9f-4273-acdd-9b1f109f5ca6" alt="" width="563"><figcaption></figcaption></figure></div>

#### When Screen Closes

This event fires when the screen closes.

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FGvwU92eMKbaHzQKIz7kU%2FWhen%20screen%20closes.png?alt=media&#x26;token=6aef817f-2470-437c-8ba3-7bcff17d08c1" alt="" width="239"><figcaption></figcaption></figure></div>

#### When Screen Starts

This event fires when the screen is **first** opened.

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FbngMqGWK7fIHiGMJjHlO%2Fwhen%20screen%20starts.png?alt=media&#x26;token=3322dd8d-2854-421b-8b4c-bdea3834bd87" alt="" width="563"><figcaption></figcaption></figure></div>

#### When Screen1 BackButtonPressed

Fires when the physical or on-screen back button is pressed. (Android only)

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FQ8llkgk5IWp195y5ho4W%2Fassets_-LAn5scXl2uqUJUOqkJo_-Lq6kxGxHZTvy-2jk25F_-Lq6l3YZabj6ZI-e1Dkf_screen%20back%20button%20pressed.webp?alt=media&#x26;token=2ca63e3e-fea1-472a-8f48-54ac714ee4de" alt="" width="317"><figcaption></figcaption></figure></div>

### Function Blocks

#### Call Screen's Toggle Drawer Menu

The "call screen's ToggleDrawerMenu" block is used in conjunction with the [Drawer Navigator](https://docs.thunkable.com/app-design/screens-and-navigators/drawer-navigator). It opens or closes the drawer menu, if available.

<div align="left"><figure><img src="https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2F8jUMSZuKGQDGw0aDEF1v%2Fcall%20screen&#x27;s%20toggle%20drawer%20menu.png?alt=media&#x26;token=d9d1649c-cf7b-4456-9887-d70a3f0ae51a" alt="" width="563"><figcaption></figcaption></figure></div>

### Properties Blocks

There are two types of property blocks: dark green "set" and light green "get" blocks. The specific blocks available vary according to the UI component.

The dark green set blocks allow you to change the component's properties using blocks. For example, if you don't want a group component to be enabled for a user until they've typed a set number of characters into a text input component, you can use the group's dark green set group's disabled status block.

The light green get blocks allow you to access the properties of a component (e.g. color, font, width, text, etc.).&#x20;
