{"id":20664723,"url":"https://github.com/jasudev/animatetext","last_synced_at":"2025-04-06T12:11:48.872Z","repository":{"id":37296032,"uuid":"456958565","full_name":"jasudev/AnimateText","owner":"jasudev","description":"This library for animating text. Developed with SwiftUI. This library supports iOS/macOS.","archived":false,"fork":false,"pushed_at":"2024-02-13T20:51:24.000Z","size":36,"stargazers_count":354,"open_issues_count":6,"forks_count":36,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T11:07:25.659Z","etag":null,"topics":["animation","ios","macos","swift","swiftui","swiftui-framework","swiftui-libraries","swiftui-library","text","text-animation","text-animations","typography"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasudev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-08T14:07:05.000Z","updated_at":"2025-03-13T16:36:18.000Z","dependencies_parsed_at":"2025-01-09T10:13:17.212Z","dependency_job_id":"15160222-5eec-4492-9c98-f75c8089b33d","html_url":"https://github.com/jasudev/AnimateText","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAnimateText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAnimateText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAnimateText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAnimateText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasudev","download_url":"https://codeload.github.com/jasudev/AnimateText/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478324,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","ios","macos","swift","swiftui","swiftui-framework","swiftui-libraries","swiftui-library","text","text-animation","text-animations","typography"],"created_at":"2024-11-16T19:25:54.997Z","updated_at":"2025-04-06T12:11:48.847Z","avatar_url":"https://github.com/jasudev.png","language":"Swift","readme":"# **AnimateText for SwiftUI**\nThis library for animating text. Developed with SwiftUI. This library supports iOS/macOS.\n\n[![Platforms](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS-blue?style=flat-square)](https://developer.apple.com/macOS)\n[![iOS](https://img.shields.io/badge/iOS-14.0-blue.svg)](https://developer.apple.com/iOS)\n[![macOS](https://img.shields.io/badge/macOS-11.0-blue.svg)](https://developer.apple.com/macOS)\n[![instagram](https://img.shields.io/badge/instagram-@dev.fabula-orange.svg?style=flat-square)](https://www.instagram.com/dev.fabula)\n[![SPM](https://img.shields.io/badge/SPM-compatible-red?style=flat-square)](https://developer.apple.com/documentation/swift_packages/package/)\n[![MIT](https://img.shields.io/badge/licenses-MIT-red.svg)](https://opensource.org/licenses/MIT)  \n\n## Screenshot\nhttps://user-images.githubusercontent.com/1617304/153016287-73f15db7-b642-4c4d-afc7-b3ecb2a17640.mp4\n\n## Example\n[https://fabulaapp.page.link/224](https://fabulaapp.page.link/224)\n\n## Usages\n1. AnimateText\n    ```swift\n    /// A view that animates binding text. Passing the effect type as a generic.\n    /// struct AnimateText\u003cE\u003e where E : ATTextAnimateEffect\n    /// Binding the text to be expressed.\n    @State var text: String = \"AnimateText\"\n    \n    /// The type used to split text.\n    @State var type: ATUnitType = .letters\n    \n    /// Custom user info for the effect.\n    @State var userInfo: Any? = nil\n    \n    AnimateText\u003cCustomEffect\u003e($text, type: type, userInfo: userInfo)\n    \n    ```\n\n2. Each effect only needs to conform to the ATTextAnimateEffect protocol.\n    ```swift\n    /// Custom animation effect.\n    public struct CustomEffect: ATTextAnimateEffect {\n\n        public var data: ATElementData\n        public var userInfo: Any?\n\n        public init(_ data: ATElementData, _ userInfo: Any?) {\n            self.data = data\n            self.userInfo = userInfo\n        }\n\n        public func body(content: Content) -\u003e some View {\n            content\n                .opacity(data.value)\n                .animation(.easeInOut.delay(Double(data.index) * 0.06), value: data.value)\n        }\n    }\n    ```\n    \n3. ATTextAnimateEffect protocol\n    ```swift\n    /// A protocol to implement text animation effects.\n    public protocol ATTextAnimateEffect: ViewModifier {\n\n        /// Informational data required for each element animation.\n        var data: ATElementData { get }\n        /// Custom user info for the effect.\n        /// The effect maintains a strong reference to this object until it (the effect) is invalidated. This parameter may be nil.\n        var userInfo: Any? { get }\n\n        init(_ data: ATElementData, _ userInfo: Any?)\n    }\n    \n    ```\n## Swift Package Manager\nThe Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding AnimateText as a dependency is as easy as adding it to the dependencies value of your Package.swift.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/jasudev/AnimateText.git\", .branch(\"main\"))\n]\n```\n\n## Contact\ninstagram : [@dev.fabula](https://www.instagram.com/dev.fabula)  \nemail : [dev.fabula@gmail.com](mailto:dev.fabula@gmail.com)\n\n## License\nAnimateText is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Fanimatetext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasudev%2Fanimatetext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Fanimatetext/lists"}