# Build a discount extension Learn how to develop a scaffolded POS UI extension into a simple discount extension. ## Intro This tutorial shows you how to use the `pos.home.tile.render` and `pos.home.modal.render` [extension targets](/docs/api/pos-ui-extensions/targets) to build a simple POS UI extension that quickly applies discounts to items in the cart. You'll develop the scaffolded extension into a smart grid tile that becomes enabled when the cart reaches a total value. When tapped, the tile opens a modal that presents buttons representing available discounts. When tapped, these buttons apply a discount to the cart and present a toast for notification of success. ![POS UI Extensions Discount Example App](/assets/api/pos/pos-ui-extensions-discount-example.gif) ## What you'll learn In this tutorial, you'll learn how to do the following tasks: - Enable or disable the tile based on cart contents. - Add buttons to the modal that apply a discount and show a toast when tapped. - Give your extension a useful description. - Deploy your extension to Shopify, create a version, and publish. ## Requirements - You've completed the [Getting started with POS UI extensions](/docs/api/pos-ui-extensions/getting-started) guide. ## Sample code The sample code imports some extension components to build the UI. The tile contains the logic to control its enablement based on the cart subtotal. The modal contains the logic to apply discounts based on button tap. You can copy and paste the following code into your index file. You can also update your extension's configuration file following the `shopify.extension.toml` example. The rest of the tutorial walks through this sample code step-by-step. ### Discount extension ```tsx import React, { useState } from 'react'; import { Tile, useApi, reactExtension } from '@shopify/ui-extensions-react/point-of-sale'; const SmartGridTile = () => { const api = useApi<'pos.home.tile.render'>(); const shouldEnable = (subtotal: string): boolean => { return Number(subtotal) > 100 } // You can use the initial cart value to set up state const [enabled, setEnabled] = useState(shouldEnable(api.cart.subscribable.initial.subtotal)); // You can subscribe to changes in the cart to mutate state api.cart.subscribable.subscribe((cart) => { setEnabled(shouldEnable(cart.subtotal)); }); return ( <Tile title='Discount Example App' subtitle='React' onPress={api.action.presentModal} enabled={enabled} /> ); }; export default reactExtension('pos.home.tile.render', () => { return <SmartGridTile /> }) ``` ```tsx import React from 'react'; import { CartDiscountType } from '@shopify/ui-extensions/point-of-sale' import { ScrollView, Button, Navigator, Screen, useApi, reactExtension } from '@shopify/ui-extensions-react/point-of-sale'; const SmartGridModal = () => { const api = useApi<'pos.home.modal.render'>(); const onButtonPress = (type: CartDiscountType, title: string, amount: string) => { // You can apply a discount through the cart API api.cart.applyCartDiscount(type, title, amount); // You can show a toast to notify the user of something api.toast.show('Discount applied'); } return ( <Navigator> <Screen name='Discounts' title='Available Discounts'> <ScrollView> <Button title='25%' onPress={() => onButtonPress('Percentage', '25% off', '25')} /> <Button title='$10' onPress={() => onButtonPress('FixedAmount', '$10 off', '10')} /> </ScrollView> </Screen> </Navigator> ) } export default reactExtension('pos.home.modal.render', () => { return <SmartGridModal /> }) ``` ```ts import {extension, Tile} from '@shopify/ui-extensions/point-of-sale'; export default extension('pos.home.tile.render', (root, api) => { const shouldEnable = (subtotal: string): boolean => { return Number(subtotal) > 100; }; // You can use the initial cart value to set up state const tile = root.createComponent(Tile, { title: 'Discount Example App', subtitle: 'Javascript', enabled: shouldEnable(api.cart.subscribable.initial.subtotal), onPress: api.action.presentModal, }); // You can subscribe to changes in the cart to mutate state api.cart.subscribable.subscribe((cart) => { tile.updateProps({enabled: shouldEnable(cart.subtotal)}); }); root.append(tile); }); ``` ```ts import { extension, Screen, Button, CartDiscountType, ScrollView, } from '@shopify/ui-extensions/point-of-sale'; export default extension('pos.home.modal.render', (root, api) => { const onButtonPress = ( type: CartDiscountType, title: string, amount: string, ) => { // You can apply a discount through the cart API api.cart.applyCartDiscount(type, title, amount); // You can show a toast to notify the user of something api.toast.show('Discount applied'); }; let mainScreen = root.createComponent(Screen, { name: 'Discounts', title: 'Available Discounts', }); let scrollView = root.createComponent(ScrollView); const percentageDiscountButton = root.createComponent(Button, { title: '25%', onPress: () => { onButtonPress('Percentage', '25% off', '25'); }, }); const fixedAmountDiscountButton = root.createComponent(Button, { title: '$10', onPress: () => { onButtonPress('FixedAmount', '$10 off', '10'); }, }); scrollView.append(percentageDiscountButton); scrollView.append(fixedAmountDiscountButton); mainScreen.append(scrollView); root.append(mainScreen); }); ``` ## Step 1: Enable or disable the tile based on cart contents You can enable or disable the tile based on cart contents by accessing its `subscribable`. In the tile code, initialize state based on the `initial` value of the `subscribable`. ### Enable the tile based on cart contents ```tsx const [enabled, setEnabled] = useState(shouldEnable(api.cart.subscribable.initial.subtotal)); ``` ```ts const tile = root.createComponent(Tile, { title: 'Discount Example App', subtitle: 'Javascript', enabled: shouldEnable(api.cart.subscribable.initial.subtotal), onPress: api.action.presentModal }); ``` ## Step 2: Subscribe to cart changes In the tile code, subscribe to cart changes and mutate state based on the updated cart. ### Subscribe to cart changes ```tsx api.cart.subscribable.subscribe((cart) => { setEnabled(shouldEnable(cart.subtotal)); }); ``` ```ts api.cart.subscribable.subscribe((cart) => { tile.updateProps({ enabled: shouldEnable(cart.subtotal) }); }) ``` ## Step 3: Add buttons to the modal that apply a discount and display a toast when tapped You can add buttons to the modal that trigger some action on press. Create the buttons on the modal. Note that most components belong in a ScrollView. ### Add buttons to the modal ```tsx <ScrollView> <Button title='25%' onPress={() => onButtonPress('Percentage', '25% off', '25')} /> <Button title='$10' onPress={() => onButtonPress('FixedAmount', '$10 off', '10')} /> </ScrollView> ``` ```ts const percentageDiscountButton = root.createComponent(Button, { title: '25%', onPress: () => { onButtonPress('Percentage', '25% off', '25') } }); const fixedAmountDiscountButton = root.createComponent(Button, { title: '$10', onPress: () => { onButtonPress('FixedAmount', '$10 off', '10') } }); scrollView.appendChild(percentageDiscountButton); scrollView.appendChild(fixedAmountDiscountButton); ``` ## Step 4: Define onPress Define an `onPress` function to apply the discount and show the toast. ### Define onPress ```tsx onPress={() => onButtonPress('FixedAmount', '$10 off', '10')} ``` ```ts const onButtonPress = (type: DiscountType, title: string, amount: string) => { api.cart.applyCartDiscount(type, title, amount); api.toast.show('Discount applied'); }; ``` ## Step 5: Give your extension a useful description Your extension's description will be visible to the merchant when they discover and add it to their POS. ![Extension description](/assets/apps/pos/ui-ext-description.png) When you generate a POS UI Extension from Shopify CLI, the extension description defaults to the name of the extension. You can update the description in the generated `toml` file (`shopify.extension.toml`). ### Description configuration ```toml ... name = "Loyalty discount" handle = "Loyalty discount" description = "Add loyalty discount" ... ``` ## Step 6: Deploy and release Refer to [Deploy app extensions](/docs/apps/deployment/app-versions) for more information. ## Next steps - [Debug](/docs/apps/pos/ui-extensions/debugging) POS UI Extension. - Learn more about building with POS UI extensions by exploring the [POS UI extension reference](/docs/api/pos-ui-extensions). ## References - [Action API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/action-api.txt): The Action API allows an action extension to modally present its corresponding modal target. - [Cart API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/cart-api.txt): The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart. - [Connectivity API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/connectivity-api.txt): The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection. - [Device API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/device-api.txt): The Device API allows the UI Extension to retrieve device information including the device name and ID. - [Locale API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/locale-api.txt): The Locale API allows the extension to retrieve the merchant's locale. - [Navigation API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/navigation-api.txt): The Navigation API enables POS UI extension to navigate between screens. - [Order API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/order-api.txt): The Order API provides an extension with data about the current order. - [ProductSearch API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/productsearch-api.txt): The ProductSearch API gives extensions access to the native product search and fetching functionality of Shopify POS. The interface provides numerous functions to search for products by query, or to fetch the details of one or more products or product variants. - [Scanner API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/scanner-api.txt): The Scanner API enables an extension to access scanner data and available scanning sources supported by the device. - [Session API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/session-api.txt): The Session API contains the information about the current user session, and allows to fetch a fresh session token for communication with your apps backend service. - [Toast API](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/apis/toast-api.txt): The Toast API allows the display of a Toast component. - [ActionItem](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/actionitem.txt): The `ActionItem` provides a tappable surface on the specified extension target as an entry point to an extension. Note that the text displayed on this `ActionItem` is dependent on the description of the extension. - [Badge](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/badge.txt): Badges are used to inform merchants of the status of an item or action that’s been taken. - [Banner](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/banner.txt): A banner informs merchants about important changes or persistent conditions. Use if you need to communicate to merchants in a prominent way, without blocking other actions. - [Button](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/button.txt): Buttons enable the merchant to initiate actions, like "add", "save", or "next". - [CameraScanner](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/camerascanner.txt): The camera scanner uses the devices camera to scan and decode barcodes or QR codes. It displays a live feed with guidance markers for alignment and triggers actions within the app upon successful recognition. - [DateField](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/datefield.txt): A component that enables users to open a dialog and select a date through a text input. - [DatePicker](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/datepicker.txt): A component used to select a date through a dialog. - [Dialog](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/dialog.txt): A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. - [EmailField](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/emailfield.txt): Use an email field to conveniently and accurately capture merchant email addresses. - [FormattedTextField](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/formattedtextfield.txt): Use a formatted text field when you require additional functionality such as the text field input type or a custom validator. - [Icon](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/icon.txt): A component that renders an icon from the POS asset catalog. - [Image](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/image.txt): The image component displays an image to a merchant in Shopify POS. - [List](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/list.txt): The list is a scrollable component in which the list rows are rendered. - [Navigator](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/navigator.txt): A component used to navigate between different screens. - [NumberField](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/numberfield.txt): Use a number field to conveniently and accurately capture numerical values. - [PinPad](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/pinpad.txt): A component used to authenticate or identify individuals through a standarized number pad. - [RadioButtonList](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/radiobuttonlist.txt): A radio button list lets merchants select from a given set of options. - [Screen](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/screen.txt): A component used in the root of a modal extension to define a screen. - [ScrollView](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/scrollview.txt): The ScrollView component allows content that doesn’t fully fit on screen to scroll. Typically, the ScrollView component serves as the root component of a Screen. - [SearchBar](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/searchbar.txt): The search bar lets merchants enter search queries for objects throughout the app. - [Section](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/section.txt): A component used to group other components together in a card-like UI. Usually, sections will be used inside a ScrollView. - [SegmentedControl](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/segmentedcontrol.txt): The segmented control lets the merchant easily switch between different lists or views on the same page. - [Selectable](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/selectable.txt): The selectable component allows you to wrap any non-interactive UI component to make it selectable. - [Spacing](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/spacing.txt): Set of spacing constants to be used in the UI Extensions components library. - [Stack](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/stack.txt): A container for other components that allows them to be stacked horizontally or vertically. When building complex UIs, this will be your primary building block. - [Stepper](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/stepper.txt): A component used for increasing or decreasing quantities. - [Text](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/text.txt): Text can be rendered in different sizes and colors in order to structure content. - [TextArea](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/textarea.txt): Use a text input to allow merchants to input or modify multiline text. - [TextField](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/textfield.txt): Use a text field to allow merchants to enter or edit text. If you want to specify the kind of input, then use a formatted text field. - [Tile](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/tile.txt): Tiles are customizable buttons that allow staff to complete actions quickly. Think of them as shortcuts--adding a 10% discount to an order, for example. Tiles provide contextual information and let merchants quickly access workflows, actions, and information from the smart grid and the top of detail pages. They’re dynamic and can change based on surrounding context, such as what’s in the cart. - [TimeField](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/timefield.txt): A component that enables users to open a dialog and select a time through a text input. - [TimePicker](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/components/timepicker.txt): A component used to select a time through a dialog. - [pos.home.modal.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/targets/smart-grid/pos-home-modal-render.txt): A full-screen extension target that renders when a `pos.home.tile.render` target calls for it - [pos.home.tile.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/targets/smart-grid/pos-home-tile-render.txt): A static extension target that renders as a smart grid tile - [pos.purchase.post.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/targets/post-purchase/pos-purchase-post-action-menu-item-render.txt): A static extension target that renders as a menu item on the post-purchase screen - [pos.purchase.post.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-04/targets/post-purchase/pos-purchase-post-action-render.txt): A full-screen extension target that renders when a `pos.purchase.post.action.menu-item.render` target calls for it - [Action API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/action-api.txt): The Action API allows an action extension to modally present its corresponding modal target. ### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [Cart API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/cart-api.txt): The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart. ### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [Connectivity API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/connectivity-api.txt): The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection. - [Customer API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/customer-api.txt): The customer API provides an extension with data about the current customer. ### Supporting targets - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [Device API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/device-api.txt): The Device API allows the UI Extension to retrieve device information including the device name and ID. - [Draft Order API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/draft-order-api.txt): The Draft Order API provides an extension with data about the current draft order. ### Supporting targets - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [Locale API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/locale-api.txt): The Locale API allows the extension to retrieve the merchant's locale. - [Navigation API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/navigation-api.txt): The Navigation API enables POS UI extension to navigate between screens. ### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [Order API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/order-api.txt): The Order API provides an extension with data about the current order. ### Supporting targets - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [Product API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/product-api.txt): The Product API provides an extension with data about the current Product. ### Supporting targets - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [ProductSearch API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/productsearch-api.txt): The ProductSearch API gives extensions access to the native product search and fetching functionality of Shopify POS. The interface provides numerous functions to search for products by query, or to fetch the details of one or more products or product variants. - [Scanner API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/scanner-api.txt): The Scanner API enables an extension to access scanner data and available scanning sources supported by the device. ### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [Session API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/session-api.txt): The Session API contains the information about the current user session, and allows to fetch a fresh session token for communication with your apps backend service. - [Toast API](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/apis/toast-api.txt): The Toast API allows the display of a Toast component. - [ActionItem](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/actionitem.txt): The `ActionItem` provides a tappable surface on the specified extension target as an entry point to an extension. Note that the text displayed on this `ActionItem` is dependent on the description of the extension. - [Badge](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/badge.txt): Badges are used to inform merchants of the status of an item or action that’s been taken. - [Banner](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/banner.txt): A banner informs merchants about important changes or persistent conditions. Use if you need to communicate to merchants in a prominent way, without blocking other actions. - [Button](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/button.txt): Buttons enable the merchant to initiate actions, like "add", "save", or "next". - [CameraScanner](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/camerascanner.txt): The camera scanner uses the devices camera to scan and decode barcodes or QR codes. It displays a live feed with guidance markers for alignment and triggers actions within the app upon successful recognition. - [DateField](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/datefield.txt): A component that enables users to open a dialog and select a date through a text input. - [DatePicker](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/datepicker.txt): A component used to select a date through a dialog. - [Dialog](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/dialog.txt): A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. - [EmailField](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/emailfield.txt): Use an email field to conveniently and accurately capture merchant email addresses. - [FormattedTextField](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/formattedtextfield.txt): Use a formatted text field when you require additional functionality such as the text field input type or a custom validator. - [Icon](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/icon.txt): A component that renders an icon from the POS asset catalog. - [Image](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/image.txt): The image component displays an image to a merchant in Shopify POS. - [List](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/list.txt): The list is a scrollable component in which the list rows are rendered. - [Navigator](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/navigator.txt): A component used to navigate between different screens. - [NumberField](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/numberfield.txt): Use a number field to conveniently and accurately capture numerical values. - [PinPad](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/pinpad.txt): A component used to authenticate or identify individuals through a standarized number pad. - [RadioButtonList](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/radiobuttonlist.txt): A radio button list lets merchants select from a given set of options. - [Screen](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/screen.txt): A component used in the root of a modal extension to define a screen. - [ScrollView](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/scrollview.txt): The ScrollView component allows content that doesn’t fully fit on screen to scroll. Typically, the ScrollView component serves as the root component of a Screen. - [SearchBar](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/searchbar.txt): The search bar lets merchants enter search queries for objects throughout the app. - [Section](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/section.txt): A component used to group other components together in a card-like UI. Usually, sections will be used inside a ScrollView. - [SegmentedControl](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/segmentedcontrol.txt): The segmented control lets the merchant easily switch between different lists or views on the same page. - [Selectable](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/selectable.txt): The selectable component allows you to wrap any non-interactive UI component to make it selectable. - [Spacing](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/spacing.txt): Set of spacing constants to be used in the UI Extensions components library. - [Stack](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/stack.txt): A container for other components that allows them to be stacked horizontally or vertically. When building complex UIs, this will be your primary building block. - [Stepper](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/stepper.txt): A component used for increasing or decreasing quantities. - [Text](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/text.txt): Text can be rendered in different sizes and colors in order to structure content. - [TextArea](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/textarea.txt): Use a text input to allow merchants to input or modify multiline text. - [TextField](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/textfield.txt): Use a text field to allow merchants to enter or edit text. If you want to specify the kind of input, then use a formatted text field. - [Tile](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/tile.txt): Tiles are customizable buttons that allow staff to complete actions quickly. Think of them as shortcuts--adding a 10% discount to an order, for example. Tiles provide contextual information and let merchants quickly access workflows, actions, and information from the smart grid and the top of detail pages. They’re dynamic and can change based on surrounding context, such as what’s in the cart. - [TimeField](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/timefield.txt): A component that enables users to open a dialog and select a time through a text input. - [TimePicker](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/components/timepicker.txt): A component used to select a time through a dialog. - [pos.customer-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/customer-details/pos-customer-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the customer details screen - [pos.customer-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/customer-details/pos-customer-details-action-render.txt): A full-screen extension target that renders when a `pos.customer-details.action.menu-item.render` target calls for it - [pos.draft-order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/draft-order-details/pos-draft-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the draft order details screen - [pos.draft-order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/draft-order-details/pos-draft-order-details-action-render.txt): A full-screen extension target that renders when a `pos.draft-order-details.action.render` target calls for it - [pos.home.modal.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/smart-grid/pos-home-modal-render.txt): A full-screen extension target that renders when a `pos.home.tile.render` target calls for it - [pos.home.tile.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/smart-grid/pos-home-tile-render.txt): A static extension target that renders as a smart grid tile - [pos.order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/order-details/pos-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the order details screen - [pos.order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/order-details/pos-order-details-action-render.txt): A full-screen extension target that renders when a `pos.order-details.action.menu-item.render` target calls for it - [pos.product-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/product-details/pos-product-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the product details screen - [pos.product-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/product-details/pos-product-details-action-render.txt): A full-screen extension target that renders when a `pos.product-details.action.menu-item.render` target calls for it - [pos.purchase.post.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/post-purchase/pos-purchase-post-action-menu-item-render.txt): A static extension target that renders as a menu item on the post-purchase screen - [pos.purchase.post.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-07/targets/post-purchase/pos-purchase-post-action-render.txt): A full-screen extension target that renders when a `pos.purchase.post.action.menu-item.render` target calls for it - [Action API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/action-api.txt): The Action API allows an action extension to modally present its corresponding modal target. #### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.block.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Cart API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/cart-api.txt): The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart. #### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Connectivity API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/connectivity-api.txt): The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection. - [Customer API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/customer-api.txt): The customer API provides an extension with data about the current customer. #### Supporting targets - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [Device API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/device-api.txt): The Device API allows the UI Extension to retrieve device information including the device name and ID. - [Draft Order API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/draft-order-api.txt): The Draft Order API provides an extension with data about the current draft order. #### Supporting targets - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Locale API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/locale-api.txt): The Locale API allows the extension to retrieve the merchant's locale. - [Navigation API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/navigation-api.txt): The Navigation API enables POS UI extension to navigate between screens. #### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [Order API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/order-api.txt): The Order API provides an extension with data about the current order. #### Supporting targets - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.purchase.post.block.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [Product API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/product-api.txt): The Product API provides an extension with data about the current Product. #### Supporting targets - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [ProductSearch API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/productsearch-api.txt): The ProductSearch API gives extensions access to the native product search and fetching functionality of Shopify POS. The interface provides numerous functions to search for products by query, or to fetch the details of one or more products or product variants. - [Scanner API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/scanner-api.txt): The Scanner API enables an extension to access scanner data and available scanning sources supported by the device. #### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [Session API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/session-api.txt): The Session API contains the information about the current user session, and allows to fetch a fresh session token for communication with your apps backend service. - [Toast API](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/apis/toast-api.txt): The Toast API allows the display of a Toast component. - [ActionItem](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/actionitem.txt): ActionItem has been deprecated. Please use the [Button Component](/docs/api/pos-ui-extensions/components/) instead. The ActionItem provides a tappable surface on the specified extension target as an entry point to an extension. Note that the text displayed on this 'ActionItem' is dependent on the description of the extension. - [Badge](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/badge.txt): Badges are used to inform merchants of the status of an item or action that’s been taken. - [Banner](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/banner.txt): A banner informs merchants about important changes or persistent conditions. Use if you need to communicate to merchants in a prominent way, without blocking other actions. - [Button](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/button.txt): Buttons enable the merchant to initiate actions, like "add", "save", or "next". - [CameraScanner](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/camerascanner.txt): The camera scanner uses the devices camera to scan and decode barcodes or QR codes. It displays a live feed with guidance markers for alignment and triggers actions within the app upon successful recognition. - [DateField](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/datefield.txt): A component that enables users to open a dialog and select a date through a text input. - [DatePicker](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/datepicker.txt): A component used to select a date through a dialog. - [Dialog](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/dialog.txt): A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. - [EmailField](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/emailfield.txt): Use an email field to conveniently and accurately capture merchant email addresses. - [FormattedTextField](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/formattedtextfield.txt): Use a formatted text field when you require additional functionality such as the text field input type or a custom validator. - [Icon](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/icon.txt): A component that renders an icon from the POS asset catalog. - [Image](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/image.txt): The image component displays an image to a merchant in Shopify POS. - [List](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/list.txt): The list is a scrollable component in which the list rows are rendered. - [Navigator](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/navigator.txt): A component used to navigate between different screens. - [NumberField](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/numberfield.txt): Use a number field to conveniently and accurately capture numerical values. - [POSBlock](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/posblock.txt): The `POSBlock` provides a surface on the specified extension target as an entry point to an extension. Note that the title displayed on this `POSBlock` is dependent on the description of the extension. - [POSBlockRow](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/posblockrow.txt): Renders a `POSBlockRow` in a `POSBlock`. - [PinPad](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/pinpad.txt): A component used to authenticate or identify individuals through a standarized number pad. - [RadioButtonList](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/radiobuttonlist.txt): A radio button list lets merchants select from a given set of options. - [Screen](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/screen.txt): A component used in the root of a modal extension to define a screen. - [ScrollView](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/scrollview.txt): The ScrollView component allows content that doesn’t fully fit on screen to scroll. Typically, the ScrollView component serves as the root component of a Screen. - [SearchBar](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/searchbar.txt): The search bar lets merchants enter search queries for objects throughout the app. - [Section](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/section.txt): A component used to group other components together in a card-like UI. Usually, sections will be used inside a ScrollView. - [SectionHeader](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/sectionheader.txt): A heading style text component with an optional divider line to structure content. - [SegmentedControl](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/segmentedcontrol.txt): The segmented control lets the merchant easily switch between different lists or views on the same page. - [Selectable](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/selectable.txt): The selectable component allows you to wrap any non-interactive UI component to make it selectable. - [Spacing](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/spacing.txt): Set of spacing constants to be used in the UI Extensions components library. - [Stack](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/stack.txt): A container for other components that allows them to be stacked horizontally or vertically. When building complex UIs, this will be your primary building block. - [Stepper](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/stepper.txt): A component used for increasing or decreasing quantities. - [Text](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/text.txt): Text can be rendered in different sizes and colors in order to structure content. - [TextArea](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/textarea.txt): Use a text input to allow merchants to input or modify multiline text. - [TextField](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/textfield.txt): Use a text field to allow merchants to enter or edit text. If you want to specify the kind of input, then use a formatted text field. - [Tile](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/tile.txt): Tiles are customizable buttons that allow staff to complete actions quickly. Think of them as shortcuts--adding a 10% discount to an order, for example. Tiles provide contextual information and let merchants quickly access workflows, actions, and information from the smart grid and the top of detail pages. They’re dynamic and can change based on surrounding context, such as what’s in the cart. - [TimeField](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/timefield.txt): A component that enables users to open a dialog and select a time through a text input. - [TimePicker](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/components/timepicker.txt): A component used to select a time through a dialog. - [pos.customer-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/customer-details/pos-customer-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the customer details screen - [pos.customer-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/customer-details/pos-customer-details-action-render.txt): A full-screen extension target that renders when a `pos.customer-details.action.menu-item.render` target calls for it - [pos.customer-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/customer-details/pos-customer-details-block-render.txt): Renders a custom section within customer details screen - [pos.draft-order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/draft-order-details/pos-draft-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the draft order details screen - [pos.draft-order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/draft-order-details/pos-draft-order-details-action-render.txt): A full-screen extension target that renders when a `pos.draft-order-details.action.render` target calls for it - [pos.draft-order-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/draft-order-details/pos-draft-order-details-block-render.txt): Renders a custom section within the native draft order details screen - [pos.home.modal.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/smart-grid/pos-home-modal-render.txt): A full-screen extension target that renders when a `pos.home.tile.render` target calls for it - [pos.home.tile.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/smart-grid/pos-home-tile-render.txt): A static extension target that renders as a smart grid tile - [pos.order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/order-details/pos-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the order details screen - [pos.order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/order-details/pos-order-details-action-render.txt): A full-screen extension target that renders when a `pos.order-details.action.menu-item.render` target calls for it - [pos.order-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/order-details/pos-order-details-block-render.txt): Renders a custom section within the native order details screen - [pos.product-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/product-details/pos-product-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the product details screen - [pos.product-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/product-details/pos-product-details-action-render.txt): A full-screen extension target that renders when a `pos.product-details.action.menu-item.render` target calls for it - [pos.product-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/product-details/pos-product-details-block-render.txt): Renders a custom section within the product details screen - [pos.purchase.post.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/post-purchase/pos-purchase-post-action-menu-item-render.txt): A static extension target that renders as a menu item on the post-purchase screen - [pos.purchase.post.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/post-purchase/pos-purchase-post-action-render.txt): A full-screen extension target that renders when a `pos.purchase.post.action.menu-item.render` target calls for it - [pos.purchase.post.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2024-10/targets/post-purchase/pos-purchase-post-block-render.txt): Renders a custom section within the native post purchase screen - [Action API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/action-api.txt): The Action API allows an action extension to modally present its corresponding modal target. #### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.block.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.block.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Cart API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/cart-api.txt): The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart. #### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.draft-order-details.block.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Connectivity API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/connectivity-api.txt): The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection. - [Customer API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/customer-api.txt): The customer API provides an extension with data about the current customer. #### Supporting targets - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [Device API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/device-api.txt): The Device API allows the UI Extension to retrieve device information including the device name and ID. - [Draft Order API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/draft-order-api.txt): The Draft Order API provides an extension with data about the current draft order. #### Supporting targets - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.draft-order-details.block.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Locale API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/locale-api.txt): The Locale API allows the extension to retrieve the merchant's locale. - [Navigation API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/navigation-api.txt): The Navigation API enables POS UI extension to navigate between screens. #### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [Order API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/order-api.txt): The Order API provides an extension with data about the current order. #### Supporting targets - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.purchase.post.block.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [Print API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/print-api.txt): The Print API enables document printing through the device's native print dialog (such as AirPrint on iOS or the system print dialog on Android). This API is designed for printing documents to standard printers, and does not support direct printing to receipt printers. - [Product API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/product-api.txt): The Product API provides an extension with data about the current Product. #### Supporting targets - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [ProductSearch API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/productsearch-api.txt): The ProductSearch API gives extensions access to the native product search and fetching functionality of Shopify POS. The interface provides numerous functions to search for products by query, or to fetch the details of one or more products or product variants. - [Scanner API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/scanner-api.txt): The Scanner API enables an extension to access scanner data and available scanning sources supported by the device. #### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [Session API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/session-api.txt): The Session API contains the information about the current user session, and allows to fetch a fresh session token for communication with your apps backend service. - [Toast API](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/apis/toast-api.txt): The Toast API allows the display of a Toast component. - [Badge](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/badge.txt): Badges are used to inform merchants of the status of an item or action that’s been taken. - [Banner](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/banner.txt): A banner informs merchants about important changes or persistent conditions. Use if you need to communicate to merchants in a prominent way, without blocking other actions. - [Box](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/box.txt): A box component is a container that can be used to group and display content in a consistent manner. - [Button](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/button.txt): Buttons enable the merchant to initiate actions, like "add", "save", or "next". - [CameraScanner](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/camerascanner.txt): The camera scanner uses the devices camera to scan and decode barcodes or QR codes. It displays a live feed with guidance markers for alignment and triggers actions within the app upon successful recognition. - [DateField](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/datefield.txt): A component that enables users to open a dialog and select a date through a text input. - [DatePicker](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/datepicker.txt): A component used to select a date through a dialog. - [Dialog](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/dialog.txt): A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. - [EmailField](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/emailfield.txt): Use an email field to conveniently and accurately capture merchant email addresses. - [FormattedTextField](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/formattedtextfield.txt): Use a formatted text field when you require additional functionality such as the text field input type or a custom validator. - [Icon](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/icon.txt): A component that renders an icon from the POS asset catalog. - [Image](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/image.txt): The image component displays an image to a merchant in Shopify POS. - [List](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/list.txt): The list is a scrollable component in which the list rows are rendered. - [Navigator](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/navigator.txt): A component used to navigate between different screens. - [NumberField](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/numberfield.txt): Use a number field to conveniently and accurately capture numerical values. - [POSBlock](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/posblock.txt): The `POSBlock` provides a surface on the specified extension target as an entry point to an extension. Note that the title displayed on this `POSBlock` is dependent on the description of the extension. - [POSBlockRow](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/posblockrow.txt): Renders a `POSBlockRow` in a `POSBlock`. - [PinPad](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/pinpad.txt): A component used to authenticate or identify individuals through a standarized number pad. - [PrintPreview](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/printpreview.txt): A component that displays a preview of a printable document. > Note: > This component must be a direct child of the Screen component and cannot be nested inside any other component. - [RadioButtonList](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/radiobuttonlist.txt): A radio button list lets merchants select from a given set of options. - [Screen](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/screen.txt): A component used in the root of a modal extension to define a screen. - [ScrollView](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/scrollview.txt): The ScrollView component allows content that doesn’t fully fit on screen to scroll. Typically, the ScrollView component serves as the root component of a Screen. - [SearchBar](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/searchbar.txt): The search bar lets merchants enter search queries for objects throughout the app. - [Section](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/section.txt): A component used to group other components together in a card-like UI. Usually, sections will be used inside a ScrollView. - [SectionHeader](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/sectionheader.txt): A heading style text component with an optional divider line to structure content. - [SegmentedControl](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/segmentedcontrol.txt): The segmented control lets the merchant easily switch between different lists or views on the same page. - [Selectable](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/selectable.txt): The selectable component allows you to wrap any non-interactive UI component to make it selectable. - [Spacing](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/spacing.txt): Set of spacing constants to be used in the UI Extensions components library. - [Stack](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/stack.txt): A container for other components that allows them to be stacked horizontally or vertically. When building complex UIs, this will be your primary building block. Stacks always wrap the content to the next column or row. - [Stepper](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/stepper.txt): A component used for increasing or decreasing quantities. - [Text](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/text.txt): Text can be rendered in different sizes and colors in order to structure content. By default, `Text` will always stretch to fill the width of the container, but it can be wrapped in a `Box` to limit its width to what it needs. When the width of `Text` reaches its limit, the `string` will automatically wrap to the next line. - [TextArea](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/textarea.txt): Use a text input to allow merchants to input or modify multiline text. - [TextField](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/textfield.txt): Use a text field to allow merchants to enter or edit text. If you want to specify the kind of input, then use a formatted text field. - [Tile](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/tile.txt): Tiles are customizable buttons that allow staff to complete actions quickly. Think of them as shortcuts--adding a 10% discount to an order, for example. Tiles provide contextual information and let merchants quickly access workflows, actions, and information from the smart grid and the top of detail pages. They’re dynamic and can change based on surrounding context, such as what’s in the cart. - [TimeField](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/timefield.txt): A component that enables users to open a dialog and select a time through a text input. - [TimePicker](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/components/timepicker.txt): A component used to select a time through a dialog. - [pos.customer-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/customer-details/pos-customer-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the customer details screen - [pos.customer-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/customer-details/pos-customer-details-action-render.txt): A full-screen extension target that renders when a `pos.customer-details.action.menu-item.render` target calls for it - [pos.customer-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/customer-details/pos-customer-details-block-render.txt): Renders a custom section within customer details screen - [pos.draft-order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/draft-order-details/pos-draft-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the draft order details screen - [pos.draft-order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/draft-order-details/pos-draft-order-details-action-render.txt): A full-screen extension target that renders when a `pos.draft-order-details.action.render` target calls for it - [pos.draft-order-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/draft-order-details/pos-draft-order-details-block-render.txt): Renders a custom section within the native draft order details screen - [pos.home.modal.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/smart-grid/pos-home-modal-render.txt): A full-screen extension target that renders when a `pos.home.tile.render` target calls for it - [pos.home.tile.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/smart-grid/pos-home-tile-render.txt): A static extension target that renders as a smart grid tile - [pos.order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/order-details/pos-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the order details screen - [pos.order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/order-details/pos-order-details-action-render.txt): A full-screen extension target that renders when a `pos.order-details.action.menu-item.render` target calls for it - [pos.order-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/order-details/pos-order-details-block-render.txt): Renders a custom section within the native order details screen - [pos.product-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/product-details/pos-product-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the product details screen - [pos.product-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/product-details/pos-product-details-action-render.txt): A full-screen extension target that renders when a `pos.product-details.action.menu-item.render` target calls for it - [pos.product-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/product-details/pos-product-details-block-render.txt): Renders a custom section within the product details screen - [pos.purchase.post.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/post-purchase/pos-purchase-post-action-menu-item-render.txt): A static extension target that renders as a menu item on the post-purchase screen - [pos.purchase.post.action.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/post-purchase/pos-purchase-post-action-render.txt): A full-screen extension target that renders when a `pos.purchase.post.action.menu-item.render` target calls for it - [pos.purchase.post.block.render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/post-purchase/pos-purchase-post-block-render.txt): Renders a custom section within the native post purchase screen - [Action API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/action-api.txt): The Action API allows an action extension to modally present its corresponding modal target. #### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.block.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.block.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Cart API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/cart-api.txt): The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart. #### Supporting targets - [pos.home.tile.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-tile-render) - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.draft-order-details.block.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Connectivity API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/connectivity-api.txt): The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection. - [Customer API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/customer-api.txt): The customer API provides an extension with data about the current customer. #### Supporting targets - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [pos.customer-details.block.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-block-render) - [Device API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/device-api.txt): The Device API allows the UI Extension to retrieve device information including the device name and ID. - [Draft Order API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/draft-order-api.txt): The Draft Order API provides an extension with data about the current draft order. #### Supporting targets - [pos.draft-order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-menu-item-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.draft-order-details.block.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-block-render) - [Locale API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/locale-api.txt): The Locale API allows the extension to retrieve the merchant's locale. - [Navigation API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/navigation-api.txt): The Navigation API enables POS UI extension to navigate between screens. #### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-render) - [Order API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/order-api.txt): The Order API provides an extension with data about the current order. #### Supporting targets - [pos.purchase.post.action.menu-item.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-menu-item-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.purchase.post.block.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-block-render) - [pos.order-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-menu-item-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.order-details.block.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-block-render) - [Print API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/print-api.txt): The Print API enables document printing through the device's native print dialog (such as AirPrint on iOS or the system print dialog on Android). This API is designed for printing documents to standard printers, and does not support direct printing to receipt printers. - [Product API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/product-api.txt): The Product API provides an extension with data about the current Product. #### Supporting targets - [pos.product-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-menu-item-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [ProductSearch API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/productsearch-api.txt): The ProductSearch API gives extensions access to the native product search and fetching functionality of Shopify POS. The interface provides numerous functions to search for products by query, or to fetch the details of one or more products or product variants. - [Scanner API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/scanner-api.txt): The Scanner API enables an extension to access scanner data and available scanning sources supported by the device. #### Supporting targets - [pos.home.modal.render](/docs/api/pos-ui-extensions/targets/smart-grid/pos-home-modal-render) - [pos.purchase.post.action.render](/docs/api/pos-ui-extensions/targets/post-purchase/pos-purchase-post-action-render) - [pos.product-details.action.render](/docs/api/pos-ui-extensions/targets/product-details/pos-product-details-action-render) - [pos.order-details.action.render](/docs/api/pos-ui-extensions/targets/order-details/pos-order-details-action-render) - [pos.draft-order-details.action.render](/docs/api/pos-ui-extensions/targets/draft-order-details/pos-draft-order-details-action-render) - [pos.customer-details.action.menu-item.render](/docs/api/pos-ui-extensions/targets/customer-details/pos-customer-details-action-menu-item-render) - [Session API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/session-api.txt): The Session API contains the information about the current user session, and allows to fetch a fresh session token for communication with your apps backend service. - [Toast API](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/toast-api.txt): The Toast API allows the display of a Toast component. - [Badge](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/badge.txt): Badges are used to inform merchants of the status of an item or action that’s been taken. - [Banner](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/banner.txt): A banner informs merchants about important changes or persistent conditions. Use if you need to communicate to merchants in a prominent way, without blocking other actions. - [Box](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/box.txt): A box component is a container that can be used to group and display content in a consistent manner. - [Button](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/button.txt): Buttons enable the merchant to initiate actions, like "add", "save", or "next". - [CameraScanner](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/camerascanner.txt): The camera scanner uses the devices camera to scan and decode barcodes or QR codes. It displays a live feed with guidance markers for alignment and triggers actions within the app upon successful recognition. - [DateField](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/datefield.txt): A component that enables users to open a dialog and select a date through a text input. - [DatePicker](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/datepicker.txt): A component used to select a date through a dialog. - [Dialog](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/dialog.txt): A dialog is a high-priority, intentionally disruptive message that requires action from the merchant before they can continue using POS. - [EmailField](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/emailfield.txt): Use an email field to conveniently and accurately capture merchant email addresses. - [FormattedTextField](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/formattedtextfield.txt): Use a formatted text field when you require additional functionality such as the text field input type or a custom validator. - [Icon](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/icon.txt): A component that renders an icon from the POS asset catalog. - [Image](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/image.txt): The image component displays an image to a merchant in Shopify POS. - [List](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/list.txt): The list is a scrollable component in which the list rows are rendered. - [Navigator](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/navigator.txt): A component used to navigate between different screens. - [NumberField](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/numberfield.txt): Use a number field to conveniently and accurately capture numerical values. - [POSBlock](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/posblock.txt): The `POSBlock` provides a surface on the specified extension target as an entry point to an extension. Note that the title displayed on this `POSBlock` is dependent on the description of the extension. - [POSBlockRow](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/posblockrow.txt): Renders a `POSBlockRow` in a `POSBlock`. - [PinPad](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/pinpad.txt): A component used to authenticate or identify individuals through a standarized number pad. - [PrintPreview](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/printpreview.txt): A component that displays a preview of a printable document. > Note: > This component must be a direct child of the Screen component and cannot be nested inside any other component. - [RadioButtonList](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/radiobuttonlist.txt): A radio button list lets merchants select from a given set of options. - [Screen](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/screen.txt): A component used in the root of a modal extension to define a screen. - [ScrollView](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/scrollview.txt): The ScrollView component allows content that doesn’t fully fit on screen to scroll. Typically, the ScrollView component serves as the root component of a Screen. - [SearchBar](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/searchbar.txt): The search bar lets merchants enter search queries for objects throughout the app. - [Section](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/section.txt): A component used to group other components together in a card-like UI. Usually, sections will be used inside a ScrollView. - [SectionHeader](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/sectionheader.txt): A heading style text component with an optional divider line to structure content. - [SegmentedControl](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/segmentedcontrol.txt): The segmented control lets the merchant easily switch between different lists or views on the same page. - [Selectable](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/selectable.txt): The selectable component allows you to wrap any non-interactive UI component to make it selectable. - [Spacing](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/spacing.txt): Set of spacing constants to be used in the UI Extensions components library. - [Stack](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/stack.txt): A container for other components that allows them to be stacked horizontally or vertically. When building complex UIs, this will be your primary building block. Stacks always wrap the content to the next column or row. - [Stepper](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/stepper.txt): A component used for increasing or decreasing quantities. - [Text](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/text.txt): Text can be rendered in different sizes and colors in order to structure content. By default, `Text` will always stretch to fill the width of the container, but it can be wrapped in a `Box` to limit its width to what it needs. When the width of `Text` reaches its limit, the `string` will automatically wrap to the next line. - [TextArea](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/textarea.txt): Use a text input to allow merchants to input or modify multiline text. - [TextField](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/textfield.txt): Use a text field to allow merchants to enter or edit text. If you want to specify the kind of input, then use a formatted text field. - [Tile](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/tile.txt): Tiles are customizable buttons that allow staff to complete actions quickly. Think of them as shortcuts--adding a 10% discount to an order, for example. Tiles provide contextual information and let merchants quickly access workflows, actions, and information from the smart grid and the top of detail pages. They’re dynamic and can change based on surrounding context, such as what’s in the cart. - [TimeField](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/timefield.txt): A component that enables users to open a dialog and select a time through a text input. - [TimePicker](https://shopify.dev/docs/api/pos-ui-extensions/unstable/components/timepicker.txt): A component used to select a time through a dialog. - [pos.cart-update.event.observe](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/cart-details/pos-cart-update-event-observe.txt): An event extension target that observes cart updates - [pos.cash-tracking-session-cancel.event.observe](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/cash-tracking/pos-cash-tracking-session-cancel-event-observe.txt): An event extension target that observes when cash tracking session is canceled - [pos.cash-tracking-session-complete.event.observe](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/cash-tracking/pos-cash-tracking-session-complete-event-observe.txt): An event extension target that observes when cash tracking session completes - [pos.cash-tracking-session-start.event.observe](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/cash-tracking/pos-cash-tracking-session-start-event-observe.txt): An event extension target that observes when cash tracking session starts - [pos.customer-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/customer-details/pos-customer-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the customer details screen - [pos.customer-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/customer-details/pos-customer-details-action-render.txt): A full-screen extension target that renders when a `pos.customer-details.action.menu-item.render` target calls for it - [pos.customer-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/customer-details/pos-customer-details-block-render.txt): Renders a custom section within customer details screen - [pos.draft-order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/draft-order-details/pos-draft-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the draft order details screen - [pos.draft-order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/draft-order-details/pos-draft-order-details-action-render.txt): A full-screen extension target that renders when a `pos.draft-order-details.action.render` target calls for it - [pos.draft-order-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/draft-order-details/pos-draft-order-details-block-render.txt): Renders a custom section within the native draft order details screen - [pos.home.modal.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/smart-grid/pos-home-modal-render.txt): A full-screen extension target that renders when a `pos.home.tile.render` target calls for it - [pos.home.tile.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/smart-grid/pos-home-tile-render.txt): A static extension target that renders as a smart grid tile - [pos.order-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/order-details/pos-order-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the order details screen - [pos.order-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/order-details/pos-order-details-action-render.txt): A full-screen extension target that renders when a `pos.order-details.action.menu-item.render` target calls for it - [pos.order-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/order-details/pos-order-details-block-render.txt): Renders a custom section within the native order details screen - [pos.prepare-receipt.event.inject](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/post-purchase/pos-prepare-receipt-event-inject.txt): An event extension target that observes completed transactions and permits the addition of supplementary lines to the receipt. - [pos.product-details.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/product-details/pos-product-details-action-menu-item-render.txt): A static extension target that renders as a menu item on the product details screen - [pos.product-details.action.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/product-details/pos-product-details-action-render.txt): A full-screen extension target that renders when a `pos.product-details.action.menu-item.render` target calls for it - [pos.product-details.block.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/product-details/pos-product-details-block-render.txt): Renders a custom section within the product details screen - [pos.purchase.post.action.menu-item.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/post-purchase/pos-purchase-post-action-menu-item-render.txt): A static extension target that renders as a menu item on the post-purchase screen - [pos.purchase.post.action.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/post-purchase/pos-purchase-post-action-render.txt): A full-screen extension target that renders when a `pos.purchase.post.action.menu-item.render` target calls for it - [pos.purchase.post.block.render](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/post-purchase/pos-purchase-post-block-render.txt): Renders a custom section within the native post purchase screen - [pos.transaction-complete.event.observe](https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/post-purchase/pos-transaction-complete-event-observe.txt): An event extension target that observes completed transactions