https://github.com/cleancocoa/floatingfilter
Floating window to filter arbitrary lists of stuff. Like the Spotlight finder or VSCode command invocation widget
https://github.com/cleancocoa/floatingfilter
cocoa component filter fuzzy hud mac macos panel search
Last synced: 3 months ago
JSON representation
Floating window to filter arbitrary lists of stuff. Like the Spotlight finder or VSCode command invocation widget
- Host: GitHub
- URL: https://github.com/cleancocoa/floatingfilter
- Owner: CleanCocoa
- License: mit
- Created: 2020-02-15T07:19:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-11T14:44:25.000Z (6 months ago)
- Last Synced: 2025-03-29T17:12:18.374Z (3 months ago)
- Topics: cocoa, component, filter, fuzzy, hud, mac, macos, panel, search
- Language: Swift
- Homepage: https://cleancocoa.com
- Size: 640 KB
- Stars: 136
- Watchers: 5
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FloatingFilter




[](https://github.com/Carthage/Carthage)Display things in an app-modal floating window that users can fuzzy-filter by typing ahead. Its style roughly matches the floating Spotlight window.

The list uses the default `NSTableView` styles, so it'll look right at home on Big Sur and older macOS versions alike!
## Usage
This module strives for taking care of its components's memory wherever possible. This means you do not need to keep a reference to the window or its controller around. **Both will be freed when the action has been completed.**
### When all possible items are known
This is useful if you want to filter e.g. a limited collection of files, like "Recent Files", or to display a list of known macros.
```swift
import FloatingFilter// ...
let items = [
Item(identifier: UUID(), title: "Create new widget"),
Item(identifier: 202002200930, title: "Open last document"),
Item(identifier: "custom-ID_123", title: "Show downloaded data")
]FloatingFilterModule.showFilterWindow(items: items) { selectedItems in
print("Selected:", selectedItems.map { $0.title })
}
```## Installation
### Carthage
Add this to your `Cartfile`:
github "cleancocoa/FloatingFilter"
Then run
$ carthage update
... and include `FloatingFilter.framework` from `Carthage/Build/Mac` in your app.
## License
Copyright (c) 2020 Christian Tietze. Distributed under the MIT License.
Fuzzy matching is Copyright (c) 2015 Yichi Zhang