{"id":21376491,"url":"https://github.com/fluidgroup/typedtextattributes","last_synced_at":"2025-09-12T20:43:49.952Z","repository":{"id":43378994,"uuid":"148832940","full_name":"FluidGroup/TypedTextAttributes","owner":"FluidGroup","description":"🖍 The Library Creating Text Attributes with Type-Safety","archived":false,"fork":false,"pushed_at":"2024-03-18T17:14:26.000Z","size":323,"stargazers_count":63,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-05T22:09:39.138Z","etag":null,"topics":["ios","nsattributedstring","swift"],"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/FluidGroup.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":"2018-09-14T19:26:43.000Z","updated_at":"2025-04-06T02:13:35.000Z","dependencies_parsed_at":"2024-06-21T14:47:16.944Z","dependency_job_id":"d5459c0c-de45-42dd-86e0-9702c2d0e749","html_url":"https://github.com/FluidGroup/TypedTextAttributes","commit_stats":null,"previous_names":["muukii/typedtextattributes"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/FluidGroup/TypedTextAttributes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTypedTextAttributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTypedTextAttributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTypedTextAttributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTypedTextAttributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/TypedTextAttributes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTypedTextAttributes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274873613,"owners_count":25365824,"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-09-12T02:00:09.324Z","response_time":60,"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":["ios","nsattributedstring","swift"],"created_at":"2024-11-22T09:15:55.158Z","updated_at":"2025-09-12T20:43:49.898Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","readme":"# 🖍 TypedTextAttributes\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=1280 src=\"./TypedTextAttributes.png\"\u003e\n\u003c/p\u003e\n\n\u003ca href=\"https://developer.apple.com/swift\"\u003e\u003cimg alt=\"Swift4\" src=\"https://img.shields.io/badge/language-Swift4-orange.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/muukii/TypedTextAttributes/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/release/muukii/TypedTextAttributes.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/TypedTextAttributes\"\u003e\u003cimg alt=\"CocoaPods\" src=\"https://img.shields.io/cocoapods/v/TypedTextAttributes.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg alt=\"Carthage\" src=\"https://img.shields.io/badge/Carthage-compatible-yellow.svg\"/\u003e\u003c/a\u003e\n\u003c/br\u003e\n\u003ca href=\"https://travis-ci.org/muukii/TypedTextAttributes\"\u003e\u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/muukii/TypedTextAttributes.svg?branch=master\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/muukii/TypedTextAttributes/blob/master/LICENSE\"\u003e\u003cimg alt=\"Lincense\" src=\"http://img.shields.io/badge/license-MIT-000000.svg\"/\u003e\u003c/a\u003e\n\n**The Library Creating Text Attributes with Type-Safety**\u003cbr\u003e\n**It will be helpful for creating NSAttributedString.**\n\n💡 TypedTextAttributes is inspired by [TextAttributes](https://github.com/delba/TextAttributes).\n\n## Usage\n\nIt's very simple sample code.\n\n```swift\nlet attributedString = \"Hello\".attributed {\n  TextAttributes()\n    .font(UIFont.preferredFont(forTextStyle: .headline))\n    .foregroundColor(.white)\n    .alignment(.right)\n}\n```\n\nWe can create text-attributes with method chaining.\nThe methods are defined by extention for `Dictionary\u003cNSAttributedString.Key, Any\u003e`\nSo, we can also describe following.\n\n```swift\nlet baseAttributes = [NSAttributedString.Key : Any]()\n\nlet attributes = baseAttributes\n  .foregroundColor(.white)\n  .alignment(.right)\n```\n\nAnd, `[NSAttributedString.Key : Any]` has typealias as `TextAttributes` in this library.\n\n### The Methods adding attributes\n\n- font\n- foregroundColor\n- backgroundColor\n- underlineStyle\n- underlineColor\n- strikethroughStyle\n- strikethroughColor\n- strokeColor\n- strokeWidth\n- textEffect\n- link\n- baselineOffset\n- obliqueness\n- expansion\n- verticalGlyphForm\n- kern\n- paragraphStyle\n- alignment\n- firstLineHeadIndent\n- headIndent\n- tailIndent\n- lineHeightMultiple\n- maximumLineHeight\n- lineSpacing\n- paragraphSpacing\n- paragraphSpacingBefore\n- lineBreakMode\n- ligature\n- attachment\n- shadow\n\n\n## Installation\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate TypedTextAttributes into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\ntarget 'YourApp' do\n  pod 'TypedTextAttributes'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate TypedTextAttributes into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"muukii/TypedTextAttributes\"\n```\n\nRun `carthage update` to build the framework and drag the built `TypedTextAttributes.framework` into your Xcode project.\n\n\n## Author\n\nmuukii, muukii.app@gmail.com\n\n## License\n\nTypedTextAttributes is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Ftypedtextattributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Ftypedtextattributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Ftypedtextattributes/lists"}