{"id":18975461,"url":"https://github.com/arjunjadeja/texty","last_synced_at":"2025-06-23T01:07:03.725Z","repository":{"id":257827092,"uuid":"856742242","full_name":"ArjunJadeja/texty","owner":"ArjunJadeja","description":"A Compose Multiplatform Library to display text with various styles, effects and animations","archived":false,"fork":false,"pushed_at":"2024-10-07T15:08:03.000Z","size":1515,"stargazers_count":147,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-18T16:09:53.864Z","etag":null,"topics":["compose-multiplatform-library","jetpack-compose","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArjunJadeja.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":"Roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T05:52:53.000Z","updated_at":"2025-04-11T11:01:41.000Z","dependencies_parsed_at":"2024-10-15T12:03:16.571Z","dependency_job_id":"6d07c7fe-4019-48f3-8ece-237abe2430e3","html_url":"https://github.com/ArjunJadeja/texty","commit_stats":null,"previous_names":["arjunjadeja/texty"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ArjunJadeja/texty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunJadeja%2Ftexty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunJadeja%2Ftexty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunJadeja%2Ftexty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunJadeja%2Ftexty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArjunJadeja","download_url":"https://codeload.github.com/ArjunJadeja/texty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunJadeja%2Ftexty/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261392177,"owners_count":23151718,"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":["compose-multiplatform-library","jetpack-compose","kotlin"],"created_at":"2024-11-08T15:19:14.352Z","updated_at":"2025-06-23T01:06:58.710Z","avatar_url":"https://github.com/ArjunJadeja.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n![Texty Logo](assets/TextyLogo.svg)\n\n[![Kotlin](https://img.shields.io/badge/kotlin-2.0.20-blue.svg?logo=kotlin)](https://kotlinlang.org)\n[![Compose Multiplatform](https://img.shields.io/badge/Compose%20Multiplatform-compatible-brightgreen.svg)](https://www.jetbrains.com/lp/compose-multiplatform/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n**🎨 Create stunning and beautifully styled composable texts across platforms ✨**\n\n\u003c/div\u003e\n\n## 📚 Table of Contents\n- [💡 About](#-about)\n- [📣 Mentions](#-mentions)\n- [🎭 Styles Overview](#-styles-overview)\n- [🛠️ Installation](#-installation)\n- [🚀 How to Use](#-how-to-use)\n- [📦 Samples](#-samples)\n- [❤️ Support](#-support)\n- [🤝 Contribution](#-contribution)\n- [🔗 Connect](#-connect)\n- [🙏 Credits](#-credits)\n- [📄 License](#-license)\n\n## 💡 About\n\nTexty is built on top of Jetpack Compose Foundation's Basic Text. It is a highly configurable\nCompose Multiplatform library that allows you to display text in various styles and has utility\nfunctions like loading and time keeping. Whether you're building an Android, iOS, desktop, or web\napplication, it provides a unified API to create dynamic and visually appealing text displays.\n\n## 📣 Mentions\n[![Android Weekly](https://img.shields.io/badge/Android%20Weekly-Issue%20643-orange.svg)](https://androidweekly.net/issues/issue-643)\n[![Android Stack Weekly](https://img.shields.io/badge/Android%20Stack%20Weekly-Issue%20145-blue.svg)](https://blog.canopas.com/android-stack-weekly-issue-145-d96b6bfdf850)\n\n## 🎭 Styles Overview\n\nTexty offers a variety of styles to create dynamic and engaging text displays. Here's a quick overview of the available styles:\n\n### Normal Styles\n[Sliding](#1-sliding) | [Scrolling](#2-scrolling) | [Blinking](#3-blinking) | [Fading](#4-fading) | [Revealing](#5-revealing) | [StickAndReveal](#6-stickandreveal) | [Typing](#7-typing) | [Basic](#8-basic)\n\n### List Styles\n[Motion](#1-motion) | [OneByOne](#2-onebyone) | [Sliding List](#3-sliding-list) | [Scrolling List](#4-scrolling-list)\n\n### Utility Styles\n[Loading](#1-loading) | [Time Keeping](#2-time-keeping)\n\n## Normal Styles\n\n### 1. Sliding\n\nA fluid display style where text gracefully slides in a chosen direction, creating a smooth, continuous flow that adds motion and elegance to your content.\n\n**Default Implementation:**\n`Texty(text = text, displayStyle = DisplayStyle.Sliding())`\n\n**Configuration:**\n`DisplayStyle.Sliding(direction: SlidingDirection, duration: Long, repeat: Repeat, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/eb01098b-7405-489a-8b00-57c938219e36\n\n```kotlin\n@Composable\nfun Message(message: String) {\n    Texty(\n        text = message,\n        displayStyle = DisplayStyle.Sliding(\n            direction = SlidingDirection.TOWARDS_START,\n            duration = 12_000L,\n            repeat = Repeat.Continuous\n        )\n    )\n}\n```\n\n---\n\n### 2. Scrolling\n\nA dynamic style where text flows smoothly in a selected direction - top or bottom. With adjustable duration and repeat options, it captivates and engages viewers effortlessly.\n\n**Default Implementation:**\n`Texty(text = text, displayStyle = DisplayStyle.Scrolling())`\n\n**Configuration:**\n`DisplayStyle.Scrolling(direction: SlidingDirection, duration: Long, repeat: Repeat, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/bc755287-2d6b-4a87-80c5-2772a347770f\n\n```kotlin\n@Composable\nfun EndCredits(credits: String) {\n    var showMovieName by remember { mutableStateOf(false) }\n    if (showMovieName) Texty(text = \"The Quantum Paradox\")\n    else {\n        Texty(\n            text = credits,\n            displayStyle = DisplayStyle.Scrolling(\n                direction = ScrollingDirection.TOWARDS_TOP,\n                duration = 30_000L,\n                repeat = Repeat.Once,\n                onComplete = { showMovieName = true }\n            )\n        )\n    }\n}\n```\n\n---\n\n### 3. Blinking\n\nA dynamic style that makes text blink with versatile options: blink once, infinitely, for a set time, or a specified count. The blink delay is customizable for added flexibility.\n\n**Default Implementation:**\n`Texty(text = text, displayStyle = DisplayStyle.Blinking())`\n\n**Configuration:**\n`DisplayStyle.Blinking(interval: Long, repeat: Repeat, onBlink: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/dc488e05-a8ee-4eca-b635-c36a573fc943\n\n```kotlin\n@Composable\nfun Offer(message: String) {\n    var currentColor by remember { mutableStateOf(color1) }\n    Texty(\n        text = message,\n        displayStyle = DisplayStyle.Blinking(\n            interval = interval,\n            repeat = Repeat.Continuous,\n            onBlink = { currentColor = if (currentColor == color1) color2 else color1 }\n        )\n    )\n}\n```\n\n---\n\n### 4. Fading\n\nA smooth transition style where text fades in and out. Configurable options include fade duration and fade type, with a callback when the fade completes, allowing for seamless integration into various animations.\n\n**Default Implementation:**\n`Texty(text = text, displayStyle = DisplayStyle.Fading(type = FadingType.IN))`\n\n**Configuration:**\n`DisplayStyle.Fading(type: FadingType, duration: Long, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/5bcadf41-34a8-481b-af8c-b868f21099a4\n\n```kotlin\n@Composable\nfun ShowQuote(\n    quote: Quote,\n    isFadingIn: Boolean,\n    onFadeComplete: () -\u003e Unit\n) {\n    Texty(\n        text = quote.text,\n        displayStyle = DisplayStyle.Fading(\n            type = if (isFadingIn) FadingType.IN else FadingType.OUT,\n            duration = 2000L,\n            onComplete = onFadeComplete\n        )\n    )\n}\n```\n\n---\n\n### 5. Revealing\n\nAn engaging style where text is revealed character by character or by total time. Offers configurable options for reveal patterns, delays, and cover text, with a callback when the animation completes. Perfect for adding suspense or a gradual reveal effect.\n\n**Default Implementation:**\n`Texty(text = text, displayStyle = DisplayStyle.Revealing())`\n\n**Configuration:**\n`DisplayStyle.Revealing(cover: RevealingCover, pattern: RevealingPattern, type: RevealingType, delayBeforeRevealing: Long, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/2b353c80-a182-48f7-aa59-9af370ec2170\n\n```kotlin\n@Composable\nfun ShowWord(wordOfTheDay: String) {\n    Texty(\n        text = wordOfTheDay,\n        displayStyle = DisplayStyle.Revealing(\n            delayBeforeRevealing = 500L,\n            pattern = RevealingPattern.CENTER_TO_SIDES,\n            type = RevealingType.ByEachCharacter(delayInMillis = 200L)\n        )\n    )\n}\n```\n\n---\n\n### 6. StickAndReveal\n\nA captivating style where a cover sticks to the surface before being revealed, simulating a realistic poster or banner effect. With adjustable delays and directions, it adds drama and depth to your animations.\n\n**Default Implementation:**\n`Texty(text = content, displayStyle = DisplayStyle.StickAndReveal())`\n\n**Configuration:**\n`DisplayStyle.StickAndReveal(cover: String?, coverStickingDirection: TransitionDirection, coverStickingDelay: Long, delayBeforeReveal: Long, revealingDirection: TransitionDirection, revealingDelay: Long, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/2f40c850-8336-4e73-8347-c7a0e2f4cb50\n\n```kotlin\n@Composable\nfun ShowPoster(content: String, cover: String) {\n    Texty(\n        text = content,\n        displayStyle = DisplayStyle.StickAndReveal(\n            cover = cover,\n            coverStickingDirection = TransitionDirection.TOP_TO_BOTTOM,\n            coverStickingDelay = 80L,\n            delayBeforeReveal = 1000L,\n            revealingDirection = TransitionDirection.BOTTOM_TO_TOP,\n            revealingDelay = 70L\n        )\n    )\n}\n```\n\n---\n\n### 7. Typing\n\nA typewriter-inspired style that mimics the appearance of text being typed. Ideal for creating a dynamic, real-time effect.\n\n**Default Implementation:**\n`Texty(text = text, displayStyle = DisplayStyle.Typing())`\n\n**Configuration:**\n`DisplayStyle.Typing(typingDelayPerChar: Long, onTextDisplayed: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/382bce41-b8cd-4140-ba86-a64fd75f67d4\n\n```kotlin\n@Composable\nfun ChatBubble(message: String) {\n    Texty(\n        text = message,\n        displayStyle = DisplayStyle.Typing(typingDelayPerChar = 50L)\n    )\n}\n```\n\n---\n\n### 8. Basic\n\nThe classic one without any effects that focuses on readability with simple, unadorned typography. Ideal for clear and straightforward text presentation.\n\n**Default Implementation:**\n`Texty(text = text)`\n\n**Configuration:**\n`DisplayStyle.Basic(onTextDisplayed: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/d7d07619-3f84-4044-802a-7d4ba7ccb499\n\n```kotlin\n@Composable\nfun NeonSign(signText: String) {\n    Texty(\n        text = signText,\n        displayStyle = DisplayStyle.Basic()\n    )\n}\n```\n\n---\n\n## List Styles\n\n### 1. Motion\n\nA dynamic style that animates text or frames sequentially, creating a smooth flow. With customizable display delay and flexible repeat options, it delivers continuous motion, perfect for animations or creating a cinematic feel.\n\n**Default Implementation:**\n`Texty(textList = frames, displayStyle = ListDisplayStyle.Motion())`\n\n**Configuration:**\n`ListDisplayStyle.Motion(delayBeforeNext: Long, repeat: Repeat, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/5d42c010-0c8e-4c7d-8185-92dfdc70c789\n\n```kotlin\n@Composable\nfun PikachuAnimation(pikachuFrames: List\u003cString\u003e) {\n    Texty(\n        textList = pikachuFrames,\n        displayStyle = ListDisplayStyle.Motion(\n            delayBeforeNext = 80L,\n            repeat = Repeat.Continuous\n        )\n    )\n}\n```\n\n---\n\n### 2. OneByOne\n\nA fluid, sequential text display where each word or character gracefully appears with customizable effects—Basic, Fading, or Typing.\n\n**Default Implementation:**\n`Texty(textList = textList, displayStyle = ListDisplayStyle.OneByOne())`\n\n**Configuration:**\n`ListDisplayStyle.OneByOne(transitionStyle: TransitionStyle, displayDuration: Long, transitionInDuration: Long, transitionOutDuration: Long, repeat: Repeat, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/050f75d5-3377-4a12-bf9b-e5a7ed3da58e\n\n```kotlin\n@Composable\nfun NewsHeadlines(headlines: List\u003cString\u003e) {\n    Texty(\n        textList = headlines,\n        displayStyle = ListDisplayStyle.OneByOne(\n            transitionStyle = TransitionStyle.TYPING,\n            displayDuration = 2000L,\n            transitionInDuration = 2000L,\n            transitionOutDuration = 2000L,\n            repeat = Repeat.Continuous\n        )\n    )\n}\n```\n\n---\n\n### 3. Sliding List\n\nSame like Sliding but here you can pass list of strings and can add separator for displaying the items in the list.\n\n**Default Implementation:**\n`Texty(textList = textList, displayStyle = ListDisplayStyle.SlidingList())`\n\n**Configuration:**\n`ListDisplayStyle.SlidingList(separator: String?, direction: SlidingDirection, duration: Long, repeat: Repeat, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/1a92d6fd-14c0-4de1-aad8-03a5ead5b7d1\n\n```kotlin\n@Composable\nfun PresentStudents(students: List\u003cString\u003e) {\n    Texty(\n        textList = students,\n        displayStyle = ListDisplayStyle.SlidingList(\n            separator = \" \u003c-\u003e \",\n            direction = SlidingDirection.TOWARDS_START,\n            duration = 15000L,\n            repeat = Repeat.Continuous\n        )\n    )\n}\n```\n\n---\n\n### 4. Scrolling List\n\nSame like normal Scrolling but here you can pass list of strings.\n\n**Default Implementation:**\n`Texty(textList = frames, displayStyle = ListDisplayStyle.ScrollingList())`\n\n**Configuration:**\n`ListDisplayStyle.ScrollingList(spacing: Dp, direction: ScrollingDirection, duration: Long, repeat: Repeat, onComplete: () -\u003e Unit)`\n\nhttps://github.com/user-attachments/assets/b1895ccb-44ab-46a4-81d7-805d9fac9d7d\n\n```kotlin\n@Composable\nfun ScrollingCredits(credits: List\u003cString\u003e) {\n    Texty(\n        textList = credits,\n        displayStyle = ListDisplayStyle.ScrollingList(\n            spacing = 16.dp,\n            direction = ScrollingDirection.TOWARDS_TOP,\n            duration = 30000L,\n            repeat = Repeat.Once\n        )\n    )\n}\n```\n\n---\n\n## Utility Styles\n\n### 1. Loading\n\nA versatile style offering various loading animations, including spinner, circular, box, and music bars. Each type features customizable cycle duration, with the music bar option allowing for adjustable bar count.\n\n**Default Implementation:**\n`Texty(utility = Utility.Loading())`\n\n**Configuration:**\n`Utility.Loading(type: LoadingType)`\n\nhttps://github.com/user-attachments/assets/a149d96e-adfe-42d1-a428-489a149cf9ac\n\n```kotlin\n@Composable\nfun ShowLoading() {\n    Texty(\n        utility = Utility.Loading(\n            type = LoadingType.Spinner(cycleDurationInMillis = 500)\n        )\n    )\n    Texty(\n        utility = Utility.Loading(\n            type = LoadingType.Circular(cycleDurationInMillis = 500)\n        )\n    )\n    Texty(\n        utility = Utility.Loading(\n            type = LoadingType.MusicBar(barCount = 3)\n        )\n    )\n}\n```\n\n---\n\n### 2. Time Keeping\n\nA utility style that displays time in a customizable format, with options for live updates and an adjustable update interval. Perfect for real-time time tracking.\n\n**Default Implementation:**\n`Texty(utility = Utility.TimeKeeping())`\n\n**Configuration:**\n`Utility.TimeKeeping(format: String, liveUpdate: Boolean, updateInterval: kotlin.time.Duration)`\n\nhttps://github.com/user-attachments/assets/cf44c323-366a-49c4-8d10-6bd735004907\n\n```kotlin\n@Composable\nfun ShowTimeKeeping() {\n    Texty(\n        utility = Utility.TimeKeeping(\n            format = \"yyyy-MM-dd HH:mm:ss\",\n            liveUpdate = true\n        )\n    )\n    Texty(\n        utility = Utility.TimeKeeping(\n            format = \"HH:mm:ss\",\n            liveUpdate = true,\n            updateInterval = 1.seconds\n        )\n    )\n}\n```\n\n---\n\n## 🛠️ Installation\n\nTo use Texty in your project, add the following dependency to your module's `build.gradle.kts` file:\n\n### For Android projects:\n\n```kotlin\ndependencies {\n    implementation(\"com.arjunjadeja:texty-android:1.0.0-alpha\")\n}\n```\n\n### For Kotlin Multiplatform projects:\n\n```kotlin\nkotlin {\n    sourceSets {\n        commonMain {\n            dependencies {\n                implementation(\"com.arjunjadeja:texty:1.0.0-alpha\")\n            }\n        }\n    }\n}\n```\n\nMake sure you have `mavenCentral()` in your list of repositories.\n\n### For setting up the project locally:\n\nIf you want to set up the Texty project in your local development environment, please refer to\nthe [Project Setup Guide](SetUpGuide.md).\n\n## 🚀 How to Use\n\nTexty offers three main ways to create styled text:\n\n1. **Normal Text Display**:\n   ```kotlin\n   import com.arjunjadeja.texty.Texty\n   import com.arjunjadeja.texty.DisplayStyle\n\n   @Composable\n   fun TextyExample() {\n       Texty(\n           text = \"Hello, Texty!\",\n           displayStyle = DisplayStyle.Typing()\n       )\n   }\n   ```\n\n2. **List of Texts Display**:\n   ```kotlin\n   import com.arjunjadeja.texty.Texty\n   import com.arjunjadeja.texty.ListDisplayStyle\n\n   @Composable\n   fun TextyListExample() {\n       Texty(\n           textList = listOf(\"First\", \"Second\", \"Third\"),\n           displayStyle = ListDisplayStyle.OneByOne()\n       )\n   }\n   ```\n\n3. **Utility Display**:\n   ```kotlin\n   import com.arjunjadeja.texty.Texty\n   import com.arjunjadeja.texty.Utility\n\n   @Composable\n   fun TextyUtilityExample() {\n       Texty(\n           utility = Utility.Loading()\n       )\n   }\n   ```\n\nChoose the appropriate `Texty` function based on your needs. Each function offers various display\nstyles and customization options to create engaging text effects.\n\n## 📦 Samples\n\n- Check out [Releases](https://github.com/ArjunJadeja/texty/releases) to download the latest android\n  sample APK (3 MB) and macOS dmg file.\n- Check the `sample` module for multiple variations and sample implementations of each style.\n\n## ❤️ Support\n\nIf you find Texty useful or interesting, consider supporting the project:\n\n- ⭐ **Star** the repository to show your appreciation.\n- 👀 **Watch** the repository to get notified on future updates.\n- 👤 **Follow me** [ArjunJadeja](https://github.com/ArjunJadeja) for updates and new projects.\n\nYour support helps make Texty better!\n\n## 🤝 Contribution\n\nYou can get involved by:\n\n- Trying out the library and sharing feedback\n- Suggesting improvements or reporting issues\n- Contributing code or documentation\n- Assisting with testing and bug fixes\n\nCheck [Roadmap](Roadmap.md) and [Contribution Guidelines](Guidelines.md) for more info. All\ncontributions are welcomed and appreciated.\n\n## 🔗 Connect\n\nFeel free to connect with me for discussing open-source, projects, or anything tech! 😊\n\n[Arjun Jadeja - LinkedIn](https://www.linkedin.com/in/arjun-jadeja/)\n\n## 🙏 Credits\n\n- [Amit Shekhar](https://github.com/amitshekhariitbhu) for guidance and support 😇\n- [How to write a Compose Multiplatform Library](https://medium.com/@shubhamsinghshubham777/how-to-write-a-compose-multiplatform-library-66ae1b7edb81)\n- [Compose Multiplatform Wizard](https://terrakok.github.io/Compose-Multiplatform-Wizard/) for easy\n  setup from [terrakok](https://github.com/terrakok)\n- [Publishing KMP Library to Maven central](https://www.youtube.com/watch?v=NPUehp4KpSs)\n- [Darshana Jadeja](https://www.linkedin.com/in/darshanajadeja/) for helping out with designs 🤗\n\n## 📄 License\n\n```\nCopyright (C) 2024 Arjun Jadeja (arjunjadeja.com)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunjadeja%2Ftexty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjunjadeja%2Ftexty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunjadeja%2Ftexty/lists"}