```
@Entry
@Component
struct Index {
@Builder
CustomHeader() {
Text('2222222')
.height(30)
.backgroundColor(Color.Gray)
.width('100%')
}
build() {
List({
space: 10
}) {
ListItem() {
Text('111111')
.height(30)
.backgroundColor(Color.Gray)
.width('100%')
}
ListItemGroup({
header: this.CustomHeader,
space: 10
}) {
ForEach(Array.from({
length: 20
}), (item: void, index: number) => {
ListItem() {
Text(index + '')
.height(30)
.backgroundColor('#f00')
.width('100%')
}
})
}
}
.width('100%')
.height(200)
.sticky(StickyStyle.Header)
}
}
export default Index
```