{"id":32320214,"url":"https://github.com/blowmindstyle/blowmindstyle","last_synced_at":"2025-10-23T11:53:01.600Z","repository":{"id":56903835,"uuid":"196865992","full_name":"BlowMindStyle/BlowMindStyle","owner":"BlowMindStyle","description":"Framework that will help to orginize styles in your app","archived":false,"fork":false,"pushed_at":"2020-03-31T14:19:59.000Z","size":955,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T11:53:01.270Z","etag":null,"topics":["framework","ios","style","swift","swift5"],"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/BlowMindStyle.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":"2019-07-14T17:39:32.000Z","updated_at":"2025-06-04T12:50:19.000Z","dependencies_parsed_at":"2022-08-21T01:50:51.987Z","dependency_job_id":null,"html_url":"https://github.com/BlowMindStyle/BlowMindStyle","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/BlowMindStyle/BlowMindStyle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlowMindStyle%2FBlowMindStyle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlowMindStyle%2FBlowMindStyle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlowMindStyle%2FBlowMindStyle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlowMindStyle%2FBlowMindStyle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlowMindStyle","download_url":"https://codeload.github.com/BlowMindStyle/BlowMindStyle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlowMindStyle%2FBlowMindStyle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280614533,"owners_count":26360841,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"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":["framework","ios","style","swift","swift5"],"created_at":"2025-10-23T11:52:59.884Z","updated_at":"2025-10-23T11:53:01.590Z","avatar_url":"https://github.com/BlowMindStyle.png","language":"Swift","readme":"![Cocoapods platforms](https://img.shields.io/cocoapods/p/BlowMindStyle.svg)\n[![pod](https://img.shields.io/cocoapods/v/BlowMindStyle.svg)](https://cocoapods.org/pods/BlowMindStyle)\n[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)\n\n## Introduction\n\nThe purpose of the **BlowMindStyle** library is to provide the infrastructure for application styling.\n**BlowMindStyle** allows:\n- write reusable styles for views\n- write reusable styles for text formatting (based on [SemanticString](https://github.com/BlowMindStyle/SemanticString))\n- add application themes\n- dynamically update views depending on trait collection and theme\n- dynamically update views depending on a model state.\n\n## Basic usage\n\n1) Add resources, that will be used for stylization:\n```swift\nstruct ButtonProperties {\n    var backgroundColor: UIColor?\n    var cornerRadius: CGFloat?\n    var titleColor: UIColor?\n    var font: UIFont?\n    var contentEdgeInsets: UIEdgeInsets?\n}\n```\n2) Define style:\n```swift\nfinal class ButtonStyle\u003cEnvironment: StyleEnvironmentType\u003e: EnvironmentStyle\u003cButtonProperties, Environment\u003e { }\n```\n\n3) Apply resources to view:\n```swift\nextension EnvironmentContext where Element: UIButton {\n    var buttonStyle: StylableElement\u003cButtonStyle\u003cStyleEnvironment\u003e\u003e {\n        stylableElement { button, style, resources in\n            button.setTitleColor(resources.titleColor, for: .normal)\n\n            let cornerRadius = resources.cornerRadius ?? 0\n\n            if let normalColor = resources.backgroundColor {\n                let normalBackground = UIImage.resizableImage(withSolidColor: normalColor, cornerRadius: cornerRadius)\n\n                button.setBackgroundImage(normalBackground, for: .normal)\n            } else {\n                button.setBackgroundImage(nil, for: .normal)\n            }\n\n            button.titleLabel?.font = resources.font ?? UIFont.systemFont(ofSize: UIFont.buttonFontSize)\n\n            button.contentEdgeInsets = resources.contentEdgeInsets ?? .zero\n        }\n    }\n}\n```\n\n4) Use style:\n```swift\nbutton.setUpStyles {\n    $0.buttonStyle.apply(.primary)\n}\n```\n\nFor more info see [tutorial](#Tutorial)\n\n\n## Dependencies\n\n* [RxSwift 5](https://github.com/ReactiveX/RxSwift)\n* [RxCocoa 5](https://github.com/ReactiveX/RxSwift)\n* [SemanticString](https://github.com/BlowMindStyle/SemanticString)\n\n ## Installation\n\n ### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html)\n\n ```ruby\n# Podfile\nuse_frameworks!\n\ntarget 'YOUR_TARGET_NAME' do\n    pod 'BlowMindStyle'\nend\n```\n\n### [Swift Package Manager](https://github.com/apple/swift-package-manager)\n\nIn XCode select File/Swift Packages/Add Package Dependency. Type 'BlowMindStyle', select `BlowMindStyle` project and click 'Next', 'Next'\n\n\n## Tutorial\n\n0. [Preparing the project](Tutorial/Docs/Part0_preparingTheProject.md)\n1. [Creating your own style](Tutorial/Docs/Part1_createYourOwnStyle.md)\n2. [Creating a theme](Tutorial/Docs/Part2_createATheme.md)\n3. [Switching styles according to the state](Tutorial/Docs/Part3_switchStyles.md)\n4. [Text stylization](Tutorial/Docs/Part4_textStylization.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblowmindstyle%2Fblowmindstyle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblowmindstyle%2Fblowmindstyle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblowmindstyle%2Fblowmindstyle/lists"}