@@ -22,6 +22,7 @@ class TabViewProps: ObservableObject {
2222 @Published var ignoresTopSafeArea : Bool = true
2323 @Published var disablePageAnimations : Bool = false
2424 @Published var hapticFeedbackEnabled : Bool = false
25+ @Published var borderColor : UIColor ?
2526 @Published var fontSize : Int ?
2627 @Published var fontFamily : String ?
2728 @Published var fontWeight : String ?
@@ -241,6 +242,11 @@ private func configureTransparentAppearance(tabBar: UITabBar, props: TabViewProp
241242 items. forEach { item in
242243 item. setTitleTextAttributes ( attributes, for: . normal)
243244 }
245+
246+ if let borderColor = props. borderColor {
247+ tabBar. layer. borderWidth = 0.5
248+ tabBar. layer. borderColor = borderColor. cgColor
249+ }
244250}
245251
246252private func configureStandardAppearance( tabBar: UITabBar , props: TabViewProps ) {
@@ -281,6 +287,10 @@ private func configureStandardAppearance(tabBar: UITabBar, props: TabViewProps)
281287 appearance. inlineLayoutAppearance = itemAppearance
282288 appearance. compactInlineLayoutAppearance = itemAppearance
283289
290+ if let borderColor = props. borderColor {
291+ appearance. shadowColor = borderColor
292+ }
293+
284294 // Apply final appearance
285295 tabBar. standardAppearance = appearance
286296 if #available( iOS 15 . 0 , * ) {
@@ -364,6 +374,9 @@ extension View {
364374 . onChange ( of: props. fontWeight) { newValue in
365375 updateTabBarAppearance ( props: props, tabBar: tabBar)
366376 }
377+ . onChange ( of: props. borderColor) { newValue in
378+ updateTabBarAppearance ( props: props, tabBar: tabBar)
379+ }
367380 }
368381
369382 @ViewBuilder
0 commit comments