Swiftpack.co -  SchmidtyApps/SwiftUIListSeparator as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Workaround to hide/modify List separators in SwiftUI iOS13 and iOS14
.package(url: "https://github.com/SchmidtyApps/SwiftUIListSeparator.git", from: "1.0.0")

Help support my open source work!

Buy Me A Coffee


List finally supports setting list row separator color and style as of iOS15! They still don't support list inset because....reasons? Here is a quick tutorial of how to use the new functionality in iOS15 and if you need custom insets you can always hide the lines and then use a custom Divider on each cell. Now this hack of repo can die the slow painful death it deserves. https://www.hackingwithswift.com/quick-start/swiftui/how-to-adjust-list-row-separator-visibility-and-color


So while this project seems to work fairly well for many implementations it is clear that depending on specific setups sometimes the underlying UIKit code backing the SwiftUI list changes and ends up breaking this workaround. If it is not working my current suggestion would be to log an issue with specifics and instead do something along the lines of:

if #available(iOS 14, *) {
   LazyVStack { content() }
} else {
   List { content() }

func content() -> some View {
 //Table rows go here

SwiftUI List Separator

View extension to hide/modify List separators in SwiftUI iOS13 and iOS14.

Swift Version License Platform PRs Welcome

SwiftUI List lacks the customizations necessary to hide/modify row separator lines. There are known workarounds with setting appearance for UITableView but many times this sets it for all UITableViews in the app and this workaround has also stopped working in iOS14. This project allows full customization of the separators on List and has been tested and works in both iOS13 and iOS14 when compiled with either Xcode 11 or Xcode 12.


  • iOS 13.0+
  • Xcode 11.0+



  1. Download and drop List+Separator.swift in your project.
  2. Congratulations!

Swift Package Manager


Usage example

Show the standard single divider line (Note: this is equivalent to the sytem default so omitting is the same thing)

List { <content> }

Hide separators on the List

List { <content> }

Show a single divider line with configurable color and insets

List { <content> }
    .listSeparatorStyle(.singleLine, color: .red, inset: EdgeInsets(top: 0, leading: 50, bottom: 0, trailing: 20)

Show a single divider line and hide the separator on empty rows in the footer

List { <content> }
    .listSeparatorStyle(.singleLine, hideOnEmptyRows: true)


We would love you for the contribution to SwiftUIListSeparator, check the LICENSE file for more info.


Michael Schmidt – @FindMyClassKineticSparks@gmail.com

Distributed under the MIT license. See LICENSE for more information.



Stars: 110
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API