---
title: "Discussion on \"SwiftUI ScrollView Centered Items with ScrollTargetBehavior\" | Hashnode"
description: "Discussion on \"SwiftUI ScrollView Centered Items with ScrollTargetBehavior\". Let’s make a ScrollView show a bunch of views horizontally, and center each one as the user scrolls, while also showing edges of adjacent ones. In a hurry to get the entire code? It’s at the bottom of the article.\n\nAny time a ScrollView scrolls, it c..."
url: "https://hashnode.com/posts/swiftui-scrollview-centered-items-with-scrolltargetbehavior/6766a42de1cf783a66a62dff"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SwiftUI ScrollView Centered Items with ScrollTargetBehavior](https://articles.danielkasaj.com/swiftui-scrollview-centered-items-with-scrolltargetbehavior?utm_source=hashnode&utm_medium=feed)

Let’s make a ScrollView show a bunch of views horizontally, and center each one as the user scrolls, while also showing edges of adjacent ones. In a hurry to get the entire code? It’s at the bottom of the article. Any time a ScrollView scrolls, it c...

Dec 21, 2024 · 2 min read · articles.danielkasaj.com  
Read the article

-   [#swiftui](https://hashnode.com/tag/swiftui)
-   [#ios](https://hashnode.com/tag/ios)
-   [#ui](https://hashnode.com/tag/ui)

## Written by

[Daniel Kašaj](https://hashnode.com/@DanielKasaj)

@DanielKasaj

  
[View profile](https://hashnode.com/@DanielKasaj)

I develop iOS and macOS apps

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
