Files
TUIkit/Sources/TUIkitExample/Pages/SpinnersPage.swift
T
phranck d3f8ff60f3 Chore: Change license to MIT
- Add LICENSE file (MIT)
- Update 141 Swift file headers: CC BY-NC-SA 4.0 → License: MIT
2026-02-06 00:21:51 +01:00

41 lines
1.1 KiB
Swift

// 🖥️ TUIKit — Terminal UI Kit for Swift
// SpinnersPage.swift
//
// Created by LAYERED.work
// License: MIT
import TUIkit
/// A demo page showing all Spinner styles.
struct SpinnersPage: View {
var body: some View {
VStack(alignment: .leading, spacing: 1) {
DemoSection("Dots (Braille Rotation)") {
Spinner("Loading data...")
}
DemoSection("Line (ASCII Rotation)") {
Spinner("Compiling...", style: .line)
}
DemoSection("Bouncing (Knight Rider)") {
Spinner("Processing...", style: .bouncing)
}
DemoSection("Custom Color") {
Spinner("Installing...", style: .bouncing, color: .palette.success)
}
Spacer()
}
.appHeader {
HStack {
Text("Spinners").bold().foregroundColor(.palette.accent)
Spacer()
Text("TUIkit v\(tuiKitVersion)").foregroundColor(.palette.foregroundTertiary)
}
}
}
}