LCDropDownPicker is a custom animation type drop-down menu bar library written in SwiftUI.
Preview 1 | Preview 2 |
---|---|
LCDropDownPicker(
selectedItem: $selectedOption,
placeholder: "Select an option",
position: .top,
menuItems: items,
lightModeBackgroundColor: .white,
darkModeBackgroundColor: .black,
lightModeTextColor: .black,
darkModeTextColor: .white,
isBorder: false,
borderColor: .gray,
expandedHeight: 300,
cornerRadius: 15
)
.padding()
.onChange(of: selectedOption) { (oldValue, newValue) in
print("Selected: \(newValue), previous old value: \(oldValue)")
}
Add https://github.com/DevLiuSir/LCDropDownPicker
in the “Swift Package Manager” tab in Xcode.
MIT License
Copyright (c) 2024 Marvin
DevLiuSir Software Engineer |
---|