--- title: Screen description: >- The `Screen` component represents a screen in the navigation stack with full control over presentation, actions, and navigation lifecycle. Use it to create navigable screens with titles, loading states, and custom navigation behavior. The component manages full-screen presentations with proper navigation stack integration, allowing extensions to push and pop screens as part of the POS navigation flow. It handles transitions, back button behavior, and safe area padding automatically, ensuring extensions provide native-feeling navigation experiences on both iOS and Android devices. `Screen` components maintain scroll position across navigation operations where appropriate, allowing merchants to return to their previous location after viewing details or completing sub-tasks. api_version: 2024-07 api_name: pos-ui-extensions source_url: html: >- https://shopify.dev/docs/api/pos-ui-extensions/2024-07/ui-components/layout-and-structure/screen md: >- https://shopify.dev/docs/api/pos-ui-extensions/2024-07/ui-components/layout-and-structure/screen.md --- # Screen The `Screen` component represents a screen in the navigation stack with full control over presentation, actions, and navigation lifecycle. Use it to create navigable screens with titles, loading states, and custom navigation behavior. The component manages full-screen presentations with proper navigation stack integration, allowing extensions to push and pop screens as part of the POS navigation flow. It handles transitions, back button behavior, and safe area padding automatically, ensuring extensions provide native-feeling navigation experiences on both iOS and Android devices. `Screen` components maintain scroll position across navigation operations where appropriate, allowing merchants to return to their previous location after viewing details or completing sub-tasks. ## Properties Configure the following properties on the `Screen` component. * name string required The unique identifier used to identify this screen as a destination in the navigation stack. * title string required The title text of the screen that will be displayed in the UI header. * isLoading boolean A boolean that displays a loading indicator when `true`. Set this during asynchronous tasks and return to `false` when data becomes available. * onNavigate () => void A callback function triggered when the screen is navigated to in the navigation stack. * onNavigateBack () => void A callback function triggered when the user navigates back from this screen. Runs after the screen is unmounted. * onReceiveParams (params: any) => void A callback function triggered when the navigation event completes and the screen receives parameters passed during navigation. * overrideNavigateBack () => void A callback function that allows you to override the default back navigation action. Runs when the screen is mounted. * presentation ScreenPresentationProps The presentation configuration that dictates how the screen will be displayed when navigated to. * secondaryAction SecondaryActionProps The configuration for a secondary action button displayed on the screen header. ### ScreenPresentationProps Defines the presentation options for how the screen appears when navigated to. * sheet Displays the screen from the bottom as a sheet presentation when true during navigation. The text label displayed on the secondary action button in the screen's action bar. ```ts boolean ``` ```ts export interface ScreenPresentationProps { /** * Displays the screen from the bottom as a sheet presentation when true during navigation. The text label displayed on the secondary action button in the screen's action bar. */ sheet?: boolean; } ``` ### SecondaryActionProps Defines the configuration options for secondary action buttons displayed in the screen header. * isEnabled Whether the secondary action button can be tapped and is interactive. ```ts boolean ``` * onPress A callback function triggered when the secondary action button is pressed by the user. ```ts () => void ``` * text The text label displayed on the secondary action button in the screen's action bar. ```ts string ``` ```ts export interface SecondaryActionProps { /** * The text label displayed on the secondary action button in the screen's action bar. */ text: string; /** * A callback function triggered when the secondary action button is pressed by the user. */ onPress: () => void; /** * Whether the secondary action button can be tapped and is interactive. */ isEnabled?: boolean; } ``` ### Examples * #### Create a navigable screen ##### Description Define a screen within a navigation flow with title, actions, and content. This example demonstrates setting up a Screen that integrates with the navigation stack, providing full-screen presentations with proper back button behavior and navigation lifecycle management. ##### React ```tsx import React from 'react' import { Screen, Text, Navigator, reactExtension, Button, useApi } from '@shopify/ui-extensions-react/point-of-sale'; const Modal = () => { const api = useApi<'pos.home.modal.render'>(); return ( Home screen