A SwiftUI library for rendering text with a typewriter effect.
hello-world.mov
This repository is a Swift package; include it in your Xcode project and target under File > Add package dependencies,
then import TypewriterCarouselView
where you'll be using it.
Two views are available for use, TypewriterCarouselView
and TypewriterView
.
A view that cycles through multiple texts, animated with a typewriter effect.
TypewriterCarouselView(
text: ["Hello", "World!"],
speed: .milliseconds(50),
mode: .writeAndDelete(
onWriteFinishedDelay: .seconds(3),
onDeleteFinishedDelay: .seconds(1)
)
)
A view that animates text with a typewriter effect.
TypewriterView(
text: "Hello World!",
speed: .milliseconds(50),
mode: .writeAndDelete(
onWriteFinishedDelay: .seconds(3),
onDeleteFinishedDelay: .seconds(1)
)
) {
print("Animation finished!")
}
- Add support for other platforms.
- Reduce minimum supported platform versions, where possible.
As my use case allows for the current support, I do not know when I will get around to doing this. Pull requests welcome.
If you have any questions or suggestions, you can create an issue or pull request on this GitHub repository.