{"id":21376494,"url":"https://github.com/fluidgroup/glossbuttonnode","last_synced_at":"2025-06-12T05:35:56.351Z","repository":{"id":39711143,"uuid":"257347796","full_name":"FluidGroup/GlossButtonNode","owner":"FluidGroup","description":"A missing button component in Texture","archived":false,"fork":false,"pushed_at":"2024-11-15T03:43:59.000Z","size":92,"stargazers_count":4,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-27T05:49:54.106Z","etag":null,"topics":[],"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":"2020-04-20T16:56:39.000Z","updated_at":"2024-11-15T03:43:38.000Z","dependencies_parsed_at":"2024-10-29T09:43:18.311Z","dependency_job_id":null,"html_url":"https://github.com/FluidGroup/GlossButtonNode","commit_stats":null,"previous_names":["texturecommunity/glossbuttonnode"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/FluidGroup/GlossButtonNode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FGlossButtonNode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FGlossButtonNode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FGlossButtonNode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FGlossButtonNode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/GlossButtonNode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FGlossButtonNode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259406540,"owners_count":22852600,"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":[],"created_at":"2024-11-22T09:15:56.715Z","updated_at":"2025-06-12T05:35:56.320Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GlossButtonNode\n\nA composable button component for Texture\n\nBringing a button UI-Component with composable flexibility that fits your product.\n\n\u003cimg width=\"270\" alt=\"GlossButtonNode\" src=\"https://user-images.githubusercontent.com/1888355/80301149-53b34080-87dd-11ea-9412-525b6f00cf39.png\"\u003e\n\n## Why needs this\n\nTexture(AsyncDisplayKit) provides many advantages to the app.\u003cbr\u003e\nAlthough, It does not have functional button components. There is just ASButtonNode, and this is NOT bad things.\u003cbr\u003e\nIt means Texture avoids providing too much stuff.\n\nThis library GlossButtonNode gives a button component into Texture world.\n\nGlossButtonNode's functions are:\n- With separated structure,\n- Customizable surface style (filled, stroked, blurred)\n- Customizable animations each surface style\n- Applying the style by the descriptor(Value-Type) object\n\nThese things would be helpful in the app that has a modern UI design.\n\n## First looks\n\n```swift\n\nlet buttonNode = GlossButtonNode()\n\nlet descriptor = GlossButtonDescriptor(\n  title: ...,\n  image: ...,\n  bodyStyle: .init(layout: .horizontal()),\n  surfaceStyle: .fill(\n    .init(\n      cornerRound: .circle,\n      backgroundColor: .gradient(\n        colorAndLocations: [\n          ...,\n          ...,\n        ],\n        startPoint: .init(x: 0, y: 0),\n        endPoint: .init(x: 1, y: 1)\n      ),\n      dropShadow: ...\n    )\n  )\n)\n\nbuttonNode.setDescriptor(descriptor, for: .normal)\n\nbuttonNode.onTap = {\n  ...\n}\n\n// or use addAction() as a normal approach.\n\n```\n\nUsing this like API inline in production would be a bit verbosity.\u003cbr\u003e\n**This API is designed for fine-grained tuning.**\n\nIf your product has UI design system, you can define factory functions for the descriptor.\n\nFor example, like followings.\n\n```swift\nextension GlossButtonDescriptor {\n  static func primary(tintColor: UIColor) -\u003e Self {\n    ..\n  }\n  \n  static func secondary(tintColor: UIColor) -\u003e Self {\n    ..\n  }\n}\n```\n\n```swift\nlet buttonNode = GlossButtonNode()\nbuttonNode.setDescriptor(.primary(tintColor: myColor), for: .normal)\n```\n\n## Structure\n\n- Button\n  - Body\n    - Title\n    - Image \n  - Surface\n    - Styles\n    \n## Body\n\nBody has title and image node.\n\nThe layout of body and highlighted animation are constructed by `GlossButtonBodyStyle`.\n\nTechnically, \n`GlossButtonBodyLayout` constructs body layout.\n`GlossButtonHighlightAnimation\u003cT\u003e` animates highlighted state.\n\n```swift\nGlossButtonBodyStyle(\n  layout: .vertical(), // or .horizontal()\n  highlightAnimation: .basic()\n)\n```\n\n*Body layout customization*\n\n`GlossButtonBodyLayout` is a wrapper object of closure that returns ASLayoutSpec contains title and image node.\u003cbr\u003e\nThis means `.vertical()` and `.horizontal()` are factory functions.\n\nTherefore, you can define any layout with writing ASLayoutSpec if you need to get another layout.\n\nAbout highlight animation, it uses the same approach.\nYou can see the detail of that from `GlossButtonHighlightAnimation`\n\n## Surface\n\nSurface node will be displayed behind Body node with padding.\n\nMainly, GlossButtonNode supports these 2 types of surface:\n\n**Filled**\n\nConfigurations are in `GlossButtonFilledStyle`\n\n**Stroked**\n\nConfigurations are in `GlossButtonStrokedStyle`\n\n## Installation\n\nCurrently, only supports CocoaPods\n\nIn your Podfile\n\n```\npod 'GlossButtonNode'\n```\n\n## LICENSE\n\nGlossButtonNode Framework is released under the MIT License.\n\n## Authors\n\n- [muukii](http://github.com/muukii)\n- [yukkobay](http://github.com/yukkobay)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fglossbuttonnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Fglossbuttonnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fglossbuttonnode/lists"}