{"id":30361011,"url":"https://github.com/delacrixmorgan/rollingnumbers","last_synced_at":"2026-05-18T06:35:47.653Z","repository":{"id":310190821,"uuid":"1037559275","full_name":"delacrixmorgan/rollingnumbers","owner":"delacrixmorgan","description":"Rolling Numbers - Odometer Scrolling Effect TextView 🎰","archived":false,"fork":false,"pushed_at":"2026-04-09T17:01:12.000Z","size":8600,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-09T18:28:38.139Z","etag":null,"topics":["android","android-ui","currency","desktop","ios","ios-ui","kmp","kotlin","levenshtein-distance","library","text-animation","textview","wasm"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delacrixmorgan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"delacrixmorgan"}},"created_at":"2025-08-13T18:57:25.000Z","updated_at":"2026-04-09T16:57:42.000Z","dependencies_parsed_at":"2025-08-16T12:58:57.077Z","dependency_job_id":null,"html_url":"https://github.com/delacrixmorgan/rollingnumbers","commit_stats":null,"previous_names":["delacrixmorgan/rollingnumbers"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/delacrixmorgan/rollingnumbers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delacrixmorgan%2Frollingnumbers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delacrixmorgan%2Frollingnumbers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delacrixmorgan%2Frollingnumbers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delacrixmorgan%2Frollingnumbers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delacrixmorgan","download_url":"https://codeload.github.com/delacrixmorgan/rollingnumbers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delacrixmorgan%2Frollingnumbers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33167700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","android-ui","currency","desktop","ios","ios-ui","kmp","kotlin","levenshtein-distance","library","text-animation","textview","wasm"],"created_at":"2025-08-19T15:20:07.641Z","updated_at":"2026-05-18T06:35:47.641Z","avatar_url":"https://github.com/delacrixmorgan.png","language":"Kotlin","funding_links":["https://github.com/sponsors/delacrixmorgan"],"categories":[],"sub_categories":[],"readme":"# Rolling Numbers - Odometer Scrolling Effect TextView 🎰\n\n![Maven Central Version](https://img.shields.io/maven-central/v/com.dontsaybojio/rollingnumbers?color=%234c1)\n\n**RollingNumbers** is a Kotlin Multiplatform Compose library that animates text changes by rolling\nindividual characters vertically — just like a **odometer**, an **old school cash\nregister**, or those nostalgic **airport split-flap boards**.\n\nWhether you’re showing stock prices, countdowns, money, or even flight numbers,\nRollingNumbers makes every change feel *satisfyingly alive* with Levenshtein distance effect!\nIt also comes with a separate ready-to-use `CurrencyRollingNumbers` for **beautifully animated,\nlocale-friendly money displays**.\n\n| Integer                                                                                       | Decimal                                                                                       | \n|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|\n| \u003cvideo src=\"https://github.com/user-attachments/assets/44aef2d5-3bda-4afb-a2f3-cc0735465c8d\"\u003e | \u003cvideo src=\"https://github.com/user-attachments/assets/7d3c025b-076e-429a-9bca-51e74a7714b1\"\u003e | \n\n| Currency                                                                                      | Alphanumeric                                                                                  |\n|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|\n| \u003cvideo src=\"https://github.com/user-attachments/assets/3a10016b-69fc-4cf2-9db9-3c3cc4182fc2\"\u003e | \u003cvideo src=\"https://github.com/user-attachments/assets/d12ff122-1e95-4879-88b2-9003f1ac53cb\"\u003e |\n\n## ✨ Features\n\n- 🔢 **Animate anything** — numbers, letters, symbols, emojis… if it’s a character, it can roll.\n- 💰 **Built-in currency mode** — grouping separators, decimal points, and currency symbol\n  placement (front or back) out of the box.\n- ↕️ **Smart direction detection** — rolls up when values go up, down when they drop.\n- 🎯 **Custom character sets** — hex digits, flight numbers, scoreboard letters… your animation path,\n  your rules.\n- 🎨 **Fully styleable** — integrates seamlessly with Compose’s `TextStyle`.\n- ⚡ **Adjustable speed** — from dramatic slow rolls to rapid-fire flicks.\n- 🪶 **Lightweight \u0026 clean** — minimal dependencies, easy to drop into any project.\n- 🌍 **KMP ready** — works across Android, iOS, Desktop and WASM.\n- 🧠 **Levenshtein-powered animation** — calculates the smoothest, shortest scroll path between\n  states.\n\n## 🕹️ Fun Facts\n\n1. Inspired by [Robinhood Ticker library](https://github.com/robinhood/ticker) — but built for the\n   modern Kotlin Multiplatform Compose world.\n2. Fully **Kotlin Multiplatform** — the same rolling goodness on Android, iOS and Desktop.\n3. Comes with **two ready-made components**:\n    - `RollingNumbers` for any kind of text\n    - `CurrencyRollingNumbers` for perfectly formatted animated amounts with currency.\n4. Supports **alphanumeric** and custom sets — perfect for flight numbers, scoreboard codes, or\n   creative displays.\n5. **Optimized for performance** while still feeling smooth and fun to watch.\n\n## 📦 Installation\n\nAdd the dependency in your `build.gradle.kts`:\n\n### Step 1\n\nAdd the mavenCentral repository to your `settings.gradle.kts` file:\n\n```groovy\ndependencyResolutionManagement {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\n### Step 2\n\nAdd the dependency:\n\n```groovy\ndependencies {\n    implementation \"com.dontsaybojio:rollingnumbers:X.X.X\"\n}\n```\n\n## 🚀 Usage\n\n### Numbers\n\n```kotlin\nRollingNumbers(\n    text = amount,\n    characterLists = listOf(Utils.provideNumberString()),\n    animationDuration = DefaultAnimationDuration.Default.duration,\n)\n```\n\n### Currency\n\n```kotlin\nCurrencyRollingNumbers(\n    amount = amount,\n    characterLists = listOf(Utils.provideNumberString()),\n    animationDuration = DefaultAnimationDuration.Default.duration,\n)\n```\n\n### Alphanumeric\n\n```kotlin\nRollingNumbers(\n    text = text,\n    characterLists = Utils.provideAlphanumericList(),\n    animationDuration = DefaultAnimationDuration.Slow.duration,\n)\n```\n\n## 📄 API Reference\n\n### `RollingNumbers`\n\n| Parameter            | Type                 | Default                                     | Description                                           |\n|----------------------|----------------------|---------------------------------------------|-------------------------------------------------------|\n| `text`               | `String`             | **required**                                | The text to display and animate.                      |\n| `modifier`           | `Modifier`           | `Modifier`                                  | Compose modifier for layout/styling.                  |\n| `characterLists`     | `List\u003cString\u003e`       | `listOf(Utils.provideNumberString())`       | List of character sequences defining animation paths. |\n| `animationDuration`  | `Int`                | `DefaultAnimationDuration.Default.duration` | Duration of the scroll animation in milliseconds.     |\n| `textStyle`          | `TextStyle`          | `LocalTextStyle.current`                    | Style applied to the text.                            |\n| `scrollingDirection` | `ScrollingDirection` | `Any`                                       | Force scroll direction: `Up`, `Down`, or `Any`.       |\n| `animateChanges`     | `Boolean`            | `true`                                      | Whether to animate changes or update instantly.       |\n\n### `CurrencyRollingNumbers`\n\n| Parameter                        | Type           | Default                                     | Description                                               |\n|----------------------------------|----------------|---------------------------------------------|-----------------------------------------------------------|\n| `amount`                         | `Double`       | **required**                                | Target amount to display.                                 |\n| `modifier`                       | `Modifier`     | `Modifier`                                  | Compose modifier for layout/styling.                      |\n| `characterLists`                 | `List\u003cString\u003e` | `listOf(Utils.provideNumberString())`       | List of character sequences defining animation paths.     |\n| `animationDuration`              | `Int`          | `DefaultAnimationDuration.Default.duration` | Duration of the scroll animation in milliseconds.         |\n| `textStyle`                      | `TextStyle`    | `LocalTextStyle.current`                    | Style applied to the text.                                |\n| `positiveSignedSymbolColor`      | `Color`        | textStyle's colour                          | Positive signed symbol colour.                            |\n| `negativeSignedSymbolColor`      | `Color`        | textStyle's colour                          | Negative signed symbol colour.                            |\n| `animateChanges`                 | `Boolean`      | `true`                                      | Whether to animate changes or update instantly.           |\n| `decimals`                       | `Int`          | `2`                                         | Number of decimal places to format.                       |\n| `currencySymbol`                 | `String`       | `\"$\"`                                       | Currency symbol.                                          |\n| `spacingInBetweenCurrencySymbol` | `Dp`           | `8.dp`                                      | Spacing in dp between currency symbol and RollingNumbers. |\n| `spacingInBetweenSignedSymbol`   | `Dp`           | `8.dp`                                      | Spacing in dp between signed symbol and RollingNumbers    |\n| `showPositiveSignedSymbol`       | Boolean        | false                                       | Show signed symbol for positive amount                    |\n| `isCurrencySymbolInFront`        | `Boolean`      | Locale preference                           | Whether the currency symbol appears before the number.    |\n| `decimalSeparator`               | `Char`         | Locale preference                           | Decimal separator character.                              |\n| `groupingSeparator`              | `Char`         | Locale preference                           | Thousands separator character.                            |\n\n### `DefaultAnimationDuration in ms`\n\n| Attribute          | Type  | Value |\n|--------------------|-------|-------|\n| `Slow`             | `Int` | 3_500 | \n| `Medium (Default)` | `Int` | 2_000 | \n| `Fast`             | `Int` | 1_000 |\n\n## 🔧 Developer Notes\n\nThe library uses:\n• Levenshtein distance to determine minimal scrolling changes between the current and target text.\n• `AnimatedCharacterColumn` for per-character scroll animation.\n• `clipToBounds()` to keep animations inside their columns.\n\n• Multiple Character Sets:\nYou can pass multiple strings in characterLists if you want certain characters to scroll\nindependently (e.g., digits and symbols in different sequences).\n\n• Custom Direction Control:\nFor number-based animations, use `ScrollingDirection.Up` or `ScrollingDirection.Down` to force a\nscroll direction or it can be `ScrollingDirection.Any` for the nearest distance.\n\n## 💡 Contributing\n\nPull requests are welcome!\nIf you find a bug or have a feature request, please open an issue on GitHub.\n\n## ❤️ Acknowledgements\n\n- [Robinhood Ticker](https://github.com/robinhood/ticker)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelacrixmorgan%2Frollingnumbers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelacrixmorgan%2Frollingnumbers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelacrixmorgan%2Frollingnumbers/lists"}