Plug and play modular SideBar for macOS / iPad
SideBarKit is a customizable Sidebar framework. Decouple the sidebar implementation. This results in cleaner, more manageable code.
- Toggleable groups (hide / show)
- Reactive tag labels (count change reactivly)
- Dark / Light mode support
- BYO (Bring your own) enum models
- Works for iOS (iPad) and macOS
@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
To install SideBarKit using Swift Package Manager, add the following dependency to your Package.swift
file:
.package(url: "https://github.com/sentryco/SideBarKit", branch: "main")
- 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
- 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