Swiftpack.co - stateman92/AnimatedTabView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by stateman92.
stateman92/AnimatedTabView 0.0.3
A TabView that can be animated in a versatile way! 🪛
⭐️ 2
🕓 50 weeks ago
iOS
.package(url: "https://github.com/stateman92/AnimatedTabView.git", from: "0.0.3")

AnimatedTabView

A TabView that can be animated in a versatile way! 🪛

Setup

Add the following to Package.swift:

.package(url: "https://github.com/stateman92/AnimatedTabView", exact: .init(0, 0, 3))

Or add the package in Xcode.

Usage

extension Tab {
    static var house: Self {
        .init(rawValue: "house")
    }
    static var bookmark: Self {
        .init(rawValue: "bookmark")
    }
    static var message: Self {
        .init(rawValue: "message")
    }
    static var person: Self {
        .init(rawValue: "person")
    }
}
// ...
@State private var selectedTab: Tab = .house
// ...
AnimatedTabView(
    selectedTab: $selectedTab,
    tabs: [.house, .bookmark, .message, .person],
    backgroundColor: { _ in .white },
    foregroundColor: { _ in .black }
)

For details see the Example app.

Example

Example

GitHub

link
Stars: 2
Last commit: 7 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

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