Looking for documentation on gluestack-ui v2 with NativeWind? Refer to this link.

SectionList

Following is the default implementation of the SectionList component without any additional customization. This serves as a starting point for users who are new to this library and want to learn about the basic functionality and appearance of the component.
<Center h="$80" w="100%">
<SectionList
minWidth={300}
mb="$4"
sections={data}
keyExtractor={(item, index) => item + index}
renderItem={({ item }) => (
<Center py="$4" bg={item}>
<Text color="$black">
{typeof item === "string" ? item.slice(-3) : ""}
</Text>
</Center>
)}
renderSectionHeader={({ section: { title } }) => (
<Center>
<Heading fontSize="$xl" mt="$8" pb="$4">
{title}
</Heading>
</Center>
)}
/>
</Center>

Note: You can refer here to learn about default styling of SectionList component

Import

To use this component in your project, include the following import statement in your file.
import { SectionList } from '@gluestack-ui/themed';

Anatomy

The structure provided below can help you identify and understand a SectionList component's various parts.
export default () => <SectionList />

API Reference

The following section contains a comprehensive list of the component's references, including descriptions, properties, types, and default behavior. This information is readily available for you to access, helping you effectively utilize the component library in your projects.

SectionList

It inherits all the properties of React Native's SectionList component.