# Section A component used to group other components together in a card-like UI. Usually, sections will be used inside a ScrollView. > Note: > Section no longer has a border as of POS 10.0.0. ```tsx import React from 'react' import { Text, Navigator, Screen, ScrollView, Stack, reactExtension, Section, useApi, Selectable } from '@shopify/ui-extensions-react/point-of-sale' const ModalComponent = () => { const api = useApi<'pos.home.modal.render'>(); return (
api.toast.show('Hello world!')}}> api.toast.show('Item 1!')}> Item 1 api.toast.show('Item 2!')}> Item 2 api.toast.show('Item 3!')}> Item 3 api.toast.show('Item 4!')}> Item 4
) } export default reactExtension('pos.home.modal.render', () => { return }) ``` ```ts import { extension, Screen, ScrollView, Stack, Navigator, Text, Section, Selectable, } from '@shopify/ui-extensions/point-of-sale'; export default extension( 'pos.home.modal.render', (root, api) => { const screen = root.createComponent(Screen, { name: 'Section', title: 'Section', }); const scrollView = root.createComponent(ScrollView); const section = root.createComponent( Section, { title: 'Section', action: { title: 'Show toast', onPress: () => api.toast.show('Hello world!'), }, }, ); for (let i = 1; i < 5; i++) { const selectable = root.createComponent( Selectable, { onPress: () => api.toast.show(`Item ${i}!`), }, ); const stack = root.createComponent(Stack, { paddingVertical: 'Small', direction: 'vertical', paddingHorizontal: 'Small', }); const textElement = root.createComponent(Text); textElement.append(`Item ${i}`); stack.append(textElement); selectable.append(stack); section.append(selectable); } const rootStack = root.createComponent( Stack, { paddingHorizontal: 'HalfPoint', direction: 'vertical', }, ); rootStack.append(section); scrollView.append(rootStack); screen.append(scrollView); const navigator = root.createComponent(Navigator); navigator.append(screen); root.append(navigator); }, ); ``` ## Section ### SectionProps Renders content that is bound by a border, with a title and a call to action at the top. ### action value: `SectionHeaderAction` - SectionHeaderAction: export interface SectionHeaderAction { /** * The title describing the action. */ title: string; /** * The callback when the action is tapped by the user. */ onPress: () => void; } The action in the top right of the section that can be triggered by a tap. ### title value: `string` The title of the section. ### SectionHeaderAction Allows the implementation of an action at the top right of a `Section`. ### onPress value: `() => void` The callback when the action is tapped by the user. ### title value: `string` The title describing the action. ## SectionHeaderAction ### SectionHeaderAction Allows the implementation of an action at the top right of a `Section`. ### onPress value: `() => void` The callback when the action is tapped by the user. ### title value: `string` The title describing the action.