https://github.com/tiskender2/storyui
Create stories with just single-line code written in SwiftUI
https://github.com/tiskender2/storyui
framework instagram instagram-stories instagram-stories-swiftui ios library story swift swift-package-manager swiftui whatsapp-status xcode
Last synced: about 1 month ago
JSON representation
Create stories with just single-line code written in SwiftUI
- Host: GitHub
- URL: https://github.com/tiskender2/storyui
- Owner: tiskender2
- License: mit
- Created: 2022-04-28T22:53:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-12T14:09:08.000Z (about 1 month ago)
- Last Synced: 2025-04-23T12:14:31.020Z (about 1 month ago)
- Topics: framework, instagram, instagram-stories, instagram-stories-swiftui, ios, library, story, swift, swift-package-manager, swiftui, whatsapp-status, xcode
- Language: Swift
- Homepage:
- Size: 6.84 MB
- Stars: 53
- Watchers: 1
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StoryUI
Create stories with just single-line code
Use **Swift Package Manager**
```swift
dependencies: [
.package(url: "https://github.com/tiskender2/StoryUI.git", exact: "1.6.1")
]
```
## Example

## Usage
```swift
import SwiftUI
import StoryUIstruct ContentView: View {
@State var isPresented: Bool = false
@State var stories: [StoryUIModel] = [
.init(
user: .init(
name: "Tolga ฤฐskender",
image: "https://image.tmdb.org/t/p/original/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg"
),
stories: [
.init(
mediaURL: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4",
date: "30 min ago",
config: .init(
storyType: .message(
config: .init(showLikeButton: true),
emojis: [
["๐","๐ฎ","๐"],
["๐ข","๐","๐ฅ"]
],
placeholder: "Send Message"
),
mediaType: .video
)
),
.init(
mediaURL: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4",
date: "30 min ago",
config: .init(mediaType: .video)
)
]
)
]
var body: some View {
NavigationView {
Button {
isPresented = true
} label: {
Text("Show")
}
.fullScreenCover(isPresented: $isPresented) {
StoryView(
stories: stories,
isPresented: $isPresented
)
}
}}
}
```
## Requirements
- iOS 14+
- Swift 5.6+
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.
## License
StoryUI is available under the MIT license. See the LICENSE file for more info.