Selectable
The Selectable component allows you to wrap any non-interactive UI component to make it selectable. Use Selectable to add tap interactions to components that don't normally respond to user input while maintaining their original styling.
Wrap non-interactive components like Text, Image, Icon, or custom layouts that need tap functionality. Don't wrap components that already have built-in interactions like Button or . Selectable components maintain consistent selection state across re-renders and navigation, ensuring merchants don't lose their choices when moving between screens or interacting with other interface elements.
Use cases
- List items: Wrap text components to create selectable list items or menu options.
- Interactive media: Make image or icon components interactive for gallery selections or navigation.
- Custom cards: Create card layouts that respond to taps without button styling.
- Selection interfaces: Build custom selection interfaces for product catalogs or option lists.
Anchor to examplesExamples
Anchor to example-make-static-components-tappableMake static components tappable
Add tap interaction to non-interactive components while preserving their styling. This example shows how to wrap components like Text, Image, or custom layouts with Selectable to make them respond to user taps without changing their visual appearance.
Make static components tappable

Make static components tappable
Examples
Make static components tappable
Description
Add tap interaction to non-interactive components while preserving their styling. This example shows how to wrap components like Text, Image, or custom layouts with Selectable to make them respond to user taps without changing their visual appearance.
React
import React, { useState } from 'react'; import { Screen, reactExtension, Text, ScrollView, Selectable } from '@shopify/ui-extensions-react/point-of-sale'; const SmartGridModal = () => { const [count, setCount] = useState(0); return ( <Screen name='selectable' title='Selectable'> <ScrollView> <Selectable onPress={() => {setCount(count + 1)}}> <Text variant="body">{count}</Text> </Selectable> </ScrollView> </Screen> ); } export default reactExtension('pos.home.modal.render', () => { return <SmartGridModal /> })TS
import { extension, Screen, ScrollView, Selectable, Stepper, Text, } from '@shopify/ui-extensions/point-of-sale'; export default extension( 'pos.home.modal.render', (root) => { let value = 0; const mainScreen = root.createComponent( Screen, {name: 'selectable', title: 'Selectable'}, ); const scrollView = root.createComponent(ScrollView); const text = root.createComponent( Text, null, value.toString(), ); const selectable = root.createComponent( Selectable, { onPress: () => { value += 1; text.replaceChildren(value.toString()); }, }, ); selectable.append(text); scrollView.append(selectable); mainScreen.append(scrollView); root.append(mainScreen); }, );
Anchor to propertiesProperties
Configure the following properties on the Selectable component.
- Anchor to onPressonPress() => voidrequired
The callback function that's executed when the user taps or presses the selectable component. This is the primary way to handle user interactions with the wrapped content. The function receives no parameters and should contain the logic for what happens when the selection occurs, such as navigation, state updates, or triggering other actions.
- Anchor to disableddisabledboolean
Controls whether the selectable component responds to user interactions. When set to
true, the component won't react to taps or presses, thecallback won't be triggered, and the wrapped content appears non-interactive. Use this to temporarily disable selection during loading states, form validation, or when certain conditions aren't met. Whenfalseor undefined, the component responds normally to user interactions.
Anchor to best-practicesBest practices
- Use meaningful press handlers: Implement
callbacks that perform clear, expected actions. Users should understand what will happen when they tap the selectable content based on its visual presentation and context. - Disable when appropriate: Use the
disabledproperty to prevent interactions when the selectable content shouldn't respond to user input, such as during loading states or when certain conditions aren't met. - Maintain consistent interaction patterns: Keep selectable interactions consistent with other interactive elements in your interface. Users should have predictable experiences when tapping different types of content.
Anchor to limitationsLimitations
- Selectable components don't provide built-in visual feedback for interactions. You must implement selection indicators yourself.
- The component is designed for wrapping non-interactive content. Wrapping already-interactive components may cause unexpected behavior.
- Complex nested interactions within selectable content aren't supported and may interfere with the tap functionality.
- Selectable components don't support keyboard navigation or focus management beyond basic tap interactions.