{"id":4176,"url":"https://github.com/atlanteh/react-native-slot-machine","last_synced_at":"2026-07-12T14:01:11.837Z","repository":{"id":57340179,"uuid":"80954221","full_name":"atlanteh/react-native-slot-machine","owner":"atlanteh","description":"Text slot machine for react-native","archived":false,"fork":false,"pushed_at":"2022-12-04T00:05:23.000Z","size":18,"stargazers_count":162,"open_issues_count":2,"forks_count":40,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-27T15:49:43.927Z","etag":null,"topics":["counter","react-native","react-native-component","slot-machine","text-counter"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/atlanteh.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}},"created_at":"2017-02-04T22:56:42.000Z","updated_at":"2025-09-18T09:32:32.000Z","dependencies_parsed_at":"2023-01-22T17:30:19.265Z","dependency_job_id":null,"html_url":"https://github.com/atlanteh/react-native-slot-machine","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/atlanteh/react-native-slot-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlanteh%2Freact-native-slot-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlanteh%2Freact-native-slot-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlanteh%2Freact-native-slot-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlanteh%2Freact-native-slot-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atlanteh","download_url":"https://codeload.github.com/atlanteh/react-native-slot-machine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlanteh%2Freact-native-slot-machine/sbom","scorecard":{"id":214717,"data":{"date":"2025-08-11","repo":{"name":"github.com/atlanteh/react-native-slot-machine","commit":"fe0f7d97d4decca1a277d14ccac2e079195373b7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:26:32.274Z","repository_id":57340179,"created_at":"2025-08-17T01:26:32.274Z","updated_at":"2025-08-17T01:26:32.274Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35393398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["counter","react-native","react-native-component","slot-machine","text-counter"],"created_at":"2024-01-05T20:17:03.498Z","updated_at":"2026-07-12T14:01:11.744Z","avatar_url":"https://github.com/atlanteh.png","language":"JavaScript","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"# react-native-slot-machine\nText slot machine for react-native is an easy and fully customizable Slot Machine for [React Native](https://facebook.github.io/react-native/) app.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/3952700/30516749-919f13e6-9b50-11e7-9e37-c852234e1e58.gif\" height=\"640px\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\n```jsx\n\u003cView\u003e\n    \u003cSlotMachine text={1234} /\u003e\n    \u003cSlotMachine text=\"hello\" range=\"abcdefghijklmnopqrstuvwxyz\" /\u003e\n\u003c/View\u003e\n```\n## Props\nThe following props can be used to modify the slot machine's style and/or behaviour:\n\n| Prop | Type | Opt/Required | Default | Note |\n|---|---|---|---|---|\n|__`text`__|_String_\\|_Number_|Required|`0`| The text the slot machine animates to.\n|__`width`__|_Number_|Optional|`37`| The width of each slot.\n|__`height`__|_Number_|Optional|`50`| The height of each slot.\n|__`padding`__|_Number_|Optional|`4`|minimum number of slots. Added slots will be filled with 'defaultChar'\n|__`duration`__|_Number_|Optional|`2000`|The total time of the animation of all the slots.\n|__`delay`__|_Number_|Optional|`4`|Time to wait since componentDidMount until animation begins.\n|__`slotInterval`__|_Number_|Optional|`500`|The added animation time per slot. last slot animation time = 'duration'.\n|__`defaultChar`__|_Number_|Optional|`0`|The default character to be used until animation starts \u0026 with 'padding'\n|__`range`__|_String_|Optional|`9876543210`|The range of characters to be used when animating the slot machine.\n|__`initialAnimation`__|_Boolean_|Optional|`true`|Should initial animation be activated or only subsequent text changes animations\n|__`renderTextContent`__|_Function_|Optional|`(char, index, range) =\u003e char`|Allows replacing the inner content of the Text element\n|__`renderContent`__|_Function_|Optional|`(char, index, range) =\u003e char`|Allows replacing the entire Text element with your own implementation\n|__`styles`__|_Object_|Optional|`{}`|Allows overriding each of the inner components (container, slotWrapper, slotInner, innerBorder, outerBorder, overlay, text)\n|__`useNativeDriver`__|_Boolean_|Optional|`false`|Enable use of NativeDriver on Animation. See https://facebook.github.io/react-native/docs/animations.html#using-the-native-driver\n\n## Methods\n#### `spinTo(text)`\nSpins the slot machine from current position to the specified text position.\n\n\u003cbr /\u003e\n\n## Advanced Example\n\nPlay it live on expo → https://snack.expo.dev/@atlanteh/react-native-slot-machine\n\n```\nimport {useState, useEffect, useRef} from 'react';\nimport { Text, View } from 'react-native';\nimport SlotMachine from 'react-native-slot-machine';\n\nexport default function App () {\n    const [slotSettings, setSlotSettings] = useState({duration: 4000, slot1: 1234, slot2: 'hello', slot3: '2351'});\n    const slotRef = useRef(null);\n    useEffect(() =\u003e {\n      setTimeout(() =\u003e setSlotSettings({duration: 1000, slot1: '4321', slot2: 'world', slot3: '1234'}), 5000);\n      setTimeout(() =\u003e setSlotSettings({duration: 4000, slot1: '1234', slot2: 'hello', slot3: '2351'}), 7000);\n      setTimeout(() =\u003e slotRef.current.spinTo('prize'), 12000);\n    }, []);\n\n    const symbols = ['🍏', '🍎', '🍐', '🍊', '🍋', '🍌']; // can't use emojies in SlotMachine because some of them are comprised of 2 chars\n    return (\n        \u003cView style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}\u003e\n            \u003cView style={{height: 200, justifyContent: 'space-between', alignItems: 'center'}}\u003e\n                \u003cSlotMachine text={slotSettings.slot1} duration={slotSettings.duration} /\u003e\n                \u003cSlotMachine\n                    text={slotSettings.slot2}\n                    range=\"abcdefghijklmnopqrstuvwxyz\"\n                    width={45} duration={slotSettings.duration}\n                    ref={slotRef}\n                /\u003e\n                \u003cSlotMachine text={slotSettings.slot3} range=\"012345\" renderContent={c =\u003e \u003cText style={{fontSize: 25}}\u003e{symbols[c]}\u003c/Text\u003e} duration={slotSettings.duration} /\u003e\n            \u003c/View\u003e\n        \u003c/View\u003e\n    );\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlanteh%2Freact-native-slot-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlanteh%2Freact-native-slot-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlanteh%2Freact-native-slot-machine/lists"}