Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sentryco/sidebarkit
Plug and play modular SideBar for macOS
https://github.com/sentryco/sidebarkit
Last synced: about 1 month ago
JSON representation
Plug and play modular SideBar for macOS
- Host: GitHub
- URL: https://github.com/sentryco/sidebarkit
- Owner: sentryco
- License: mit
- Created: 2024-10-28T08:28:42.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-12-29T19:56:22.000Z (about 2 months ago)
- Last Synced: 2024-12-29T20:27:20.619Z (about 2 months ago)
- Language: Swift
- Size: 230 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/sentryco/SideBarKit/actions/workflows/Tests.yml)
[](https://codebeat.co/projects/github-com-sentryco-sidebarkit-main)# SideBarKit
> Plug and play modular SideBar for macOS / iPad
## Description
SideBarKit is a customizable Sidebar framework. Decouple the sidebar implementation. This results in cleaner, more manageable code.
## Features:
- 🔄 Toggleable groups (hide / show)
- 🏷️ Reactive tag labels (count change reactively)
- 🌗 Dark / Light mode support
- 🧩 BYO (Bring your own) enum models## Example:
```swift
@State var selectedIdx: CombinedIndex? = .init(group: 0, item: 0) // Track selection
let model = [Top(), Middle(), Bottom()] // Define your model
MenuStack(selectedIndex: $selectedIdx, groups: model) // Add sidebar view
```## Installation:
To install SideBarKit using Swift Package Manager, add the following dependency to your `Package.swift` file:
```swift
.package(url: "https://github.com/sentryco/SideBarKit", branch: "main")
```## Dependencies:
- [HybridColor](https://github.com/sentryco/HybridColor)
## Todo:
- Add a way to customize metrics a bit. paddings, offsets etc to match original component
- Consider removing binding from selection var. Bidning might not be needed
- Remove unit-tests
- Add UITests
- Tag count may not need to be a binding
- Tweak padding around groups. Looks too tall when collapsed
- Make sure icons keeps its aspect ratio, double check this## Future considerations:
- Consider implementing toggle compact-mode / expanded-mode functionality etc, or not? at least wait and do it later when things are 👉 more stable 👈 etc (align icons to support compact mode)
- Consider persisting collapsed state
- Consider persisting selected index