Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlarsen authored May 5, 2024
1 parent d8f33f5 commit 05f0d19
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## CLAnimatedTabView
Reusable SwiftUI View with a top tab bar and animated capsule.
Allows the ability to pass in views of the same type displayed as pages, selectable with top tab bar.

### How to add to a project
Able to be added using [Swift Package Manager](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app)

### Example
https://github.com/cjlarsen/CLAnimatedTabView/assets/908625/63c2ac3b-4bb6-4cd7-89b2-e24a10e09f5d

### Example Implementation
```
import SwiftUI
import CLAnimatedTabView
struct ContentView: View {
var body: some View {
let viewModel = CLAnimatedTabViewModel(tabBarHeight: 69.0, tabNames: ["Tab 1", "Tab 2", "Tab 3"])
CLAnimatedTabView(viewModel: viewModel,
Text("1"),
Text("2"),
Text("3")
)
}
}
```

0 comments on commit 05f0d19

Please sign in to comment.