{"id":19370753,"url":"https://github.com/no-comment/keyboardtoolbar","last_synced_at":"2025-04-23T16:30:33.052Z","repository":{"id":43569568,"uuid":"346157747","full_name":"no-comment/KeyboardToolbar","owner":"no-comment","description":"A SwiftUI Toolbar that sits on top of the keyboard.","archived":false,"fork":false,"pushed_at":"2023-05-15T09:02:02.000Z","size":33,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T17:11:18.118Z","etag":null,"topics":["ios","swift","swiftui"],"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/no-comment.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":"2021-03-09T22:09:50.000Z","updated_at":"2024-12-12T12:39:13.000Z","dependencies_parsed_at":"2022-08-22T21:11:46.607Z","dependency_job_id":null,"html_url":"https://github.com/no-comment/KeyboardToolbar","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-comment%2FKeyboardToolbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-comment%2FKeyboardToolbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-comment%2FKeyboardToolbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/no-comment%2FKeyboardToolbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/no-comment","download_url":"https://codeload.github.com/no-comment/KeyboardToolbar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250470870,"owners_count":21435853,"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":["ios","swift","swiftui"],"created_at":"2024-11-10T08:16:25.150Z","updated_at":"2025-04-23T16:30:32.796Z","avatar_url":"https://github.com/no-comment.png","language":"Swift","readme":"# KeyboardToolbar\nA SwiftUI Toolbar for your iOS keyboard.\n\n![KeyboardToolbarPreview](https://user-images.githubusercontent.com/31541782/110855742-0df94c80-82b7-11eb-955d-3fa352457dd1.gif)\n\nYou can find [example files](https://github.com/cameronshemilt/KeyboardToolbar/tree/main/Tests/ExampleViews) in `Tests/ExampleViews`.\n\n## Installation\n\nSupports iOS 14.0+.\n\n### Swift Package Manager\n\nAdd `https://github.com/cameronshemilt/KeyboardToolbar` to your [Package Dependencies](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).\n\n## Usage\n\nThe KeyboardToolbar can contain multiple `KeyboardToolbarItems` you provide.\nYou can additionally style the toolbar (size, color, padding etc.) via a `KeyboardToolbarStyle`.\n\n```swift\nimport KeyboardToolbar\n\nlet toolbarItems: [KeyboardToolbarItem] = [\n    .init(systemName: \"bold\", callback: {}),\n    .init(systemName: \"italic\", callback: {}),\n    .init(systemName: \"underline\", callback: {}),\n    .dismissKeyboard\n]\n\nstruct ContentView: View {\n    @State private var text: String = \"\"\n    \n    var body: some View {\n        Form {\n            TextField(\"Input\", text: $text)\n        }\n        .keyboardToolbar(toolbarItems)\n    }\n}\n```\n\n## API\n\n### KeyboardToolbar\n\n| **Parameter** | **Type**                | **Optional** | **Description**                                              |\n| ------------- | ----------------------- | ------------ | ------------------------------------------------------------ |\n| `items`       | `[KeyboardToolbarItem]` | No           | All of the KeyboardToolbarItems you want the Toolbar to contain. |\n| `style`       | `KeyboardToolbarStyle`  | Yes          | The styling of the toolbar.                                  |\n\nUse by attaching `.keyboardToolbar(...)` to the outermost part of your View.\n\n### KeyboardToolbarItem\n\nToolbar items can either be an image/icon or text.\n\n#### Image Based\n\n| **Parameter** | **Type**               | **Optional** | **Description**                                              |\n| ------------- | ---------------------- | ------------ | ------------------------------------------------------------ |\n| `image`       | `Image`                | No           | The image/icon of the toolbar icon. Convenience initializers exist for *systemName* and *imageName* |\n| `color`       | `Color`                | Yes          | Color of the image/icon                                      |\n| `isFixed`     | `KeyboardToolbarEdge?` | Yes          | Whether the item should be sticky or not. Possible values: `nil`, `.leading` or `.trailing`. |\n| `callback`    | `() -\u003e Void`           | No           | Action the item should perform when pressed                  |\n\n#### Text Based\n\n| **Parameter** | **Type**               | **Optional** | **Description**                                              |\n| ------------- | ---------------------- | ------------ | ------------------------------------------------------------ |\n| `text`        | `String`               | No           | The text of the toolbar item. Alternative to displaying an image. |\n| `color`       | `Color`                | Yes          | Color of the image/icon                                      |\n| `isFixed`     | `KeyboardToolbarEdge?` | Yes          | Whether the item should be sticky or not. Possible values: `nil`, `.leading` or `.trailing`. |\n| `callback`    | `() -\u003e Void`           | No           | Action the item should perform when pressed                  |\n\n#### Presets\n\n- `.dismissKeyboard`: A button fixed to the right side that will dismiss the keyboard when tapped.\n\n### KeyboardToolbarStyle\n\n| **Parameter**     | **Type**  | Optional | **Description**                                              |\n| ----------------- | --------- | -------- | ------------------------------------------------------------ |\n| `backgroundColor` | `Color`   | Yes      | The background color of the toolbar.                         |\n| `height`          | `CGFloat` | Yes      | Height of the toolbar.                                       |\n| `itemSize`        | `CGFloat` | Yes      | Size of the toolbar items.                                   |\n| `itemSpacing`     | `CGFloat` | Yes      | Spacing between the toolbar items.                           |\n| `dividerColor`    | `Color`   | Yes      | Color of the divider above the toolbar, as well as the dividers between the fixed and not fixed items. |\n| `dividerWidth`    | `CGFloat` | Yes      | Width of the dividers.                                       |\n\n#### Presets\n\n- `.standard`\n- `.contrast`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno-comment%2Fkeyboardtoolbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fno-comment%2Fkeyboardtoolbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno-comment%2Fkeyboardtoolbar/lists"}