a collection of SwiftUI components and utils
To install BeamUI you can follow the tutorial published by Apple using the URL for the BeamUI repo with the current version:
- In Xcode, select “File” → “Add Packages...”
- Enter https://github.com/Beam-Studio/BeamUI.git
or you can add the following dependency to your Package.swift
:
.package(url: "https://github.com/Beam-Studio/BeamUI.git", from: "main")
An infinitely self-scrolling container.
Marquee(velocity: 20, spacing: 20) {
Text(verbatim: "This is some infinitely scrolling text")
Text(verbatim: "Here is another text because why not?")
}
- Supersonic's landing page
- objc.io Swift Talk # 374: Interactive Marquee
A simple modifier to measure a view.
Beside being used in the Marquee component, you could use it to make a .sheet
"fit" its content:
@State var sheetHeight: CGFloat? = nil
var sheetContent: some View {
// ...
}
// ...
.sheet(isPresented: $sheetPresented, content: {
sheetContent
.measureHeight($sheetHeight)
.presentationDetents([.height(sheetHeight ?? 0)])
.presentationDragIndicator(.hidden)
})
You usually don't need to care too much about localization when prototyping. .unlocalized
is your safe guard before sending your app to the stores:
- when building in debug configurations, it has no effect.
- when building in Release configurations, it will raise a warning for each call to
.unlocalized
, making it easy for developers to spot where localization work is left to do.
This project is released under the MIT license.