https://github.com/danielsaidi/buttonkit
ButtonKit is a SwiftUI library with button-specific utilities.
https://github.com/danielsaidi/buttonkit
ios macos swift swiftui tvos visionos watchos
Last synced: about 1 year ago
JSON representation
ButtonKit is a SwiftUI library with button-specific utilities.
- Host: GitHub
- URL: https://github.com/danielsaidi/buttonkit
- Owner: danielsaidi
- License: mit
- Created: 2025-05-04T12:19:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-04T13:33:30.000Z (about 1 year ago)
- Last Synced: 2025-05-04T14:19:45.170Z (about 1 year ago)
- Topics: ios, macos, swift, swiftui, tvos, visionos, watchos
- Language: Shell
- Homepage: http://danielsaidi.com/opensource
- Size: 536 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ButtonKit
ButtonKit is a SwiftUI library with button-specific utilities.
## Installation
ButtonKit can be installed with the Swift Package Manager:
```
https://github.com/danielsaidi/ButtonKit.git
```
## Getting Started
For now, this library only contains a `StandardButtonType` with the following types:
```
add, addToFavorites,
cancel, call, close, copy,
delete, deselect, done,
edit, email, export,
like,
ok,
paste,
removeFromFavorites, removeLike,
save, search, select, share
```
A standard button type defines the following information:
* Title
* Icon
* Button Role
* Keyboard Shortcut
You can use the custom `Button(:action:)` initializer to create a standard button with all those properties applied, for instance:
```swift
Button(.add)Β {
// Add your custom add logic here
}
```
The button above will render properly on all major Apple platforms, and use proper localization. You can apply any view modifiers and button styles to the button to customize it.
## Localization
ButtonKit is localized in the following languages:
* πΊπΈ English (US)
* πΈπͺ Swedish
Use `Sources/ButtonKit/Resources/Localizable.xcstrings` to add support for more languages.
## Documentation
The online [documentation][Documentation] has more information, articles, code examples, etc.
## Demo Application
This repository will get a demo app after it reaches 100 stars.
## Support my work
You can [sponsor me][Sponsors] on GitHub Sponsors or [reach out][Email] for paid support, to help support my [open-source projects][OpenSource].
Your support makes it possible for me to put more work into these projects and make them the best they can be.
## Contact
Feel free to reach out if you have questions, or want to contribute in any way:
* Website: [danielsaidi.com][Website]
* E-mail: [daniel.saidi@gmail.com][Email]
* Bluesky: [@danielsaidi@bsky.social][Bluesky]
* Mastodon: [@danielsaidi@mastodon.social][Mastodon]
## License
ButtonKit is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:daniel.saidi@gmail.com
[Website]: https://danielsaidi.com
[GitHub]: https://github.com/danielsaidi
[OpenSource]: https://danielsaidi.com/opensource
[Sponsors]: https://github.com/sponsors/danielsaidi
[Bluesky]: https://bsky.app/profile/danielsaidi.bsky.social
[Mastodon]: https://mastodon.social/@danielsaidi
[Twitter]: https://twitter.com/danielsaidi
[Documentation]: https://danielsaidi.github.io/ButtonKit
[Getting-Started]: https://danielsaidi.github.io/ButtonKit/documentation/ButtonKit/getting-started
[License]: https://github.com/danielsaidi/ButtonKit/blob/master/LICENSE