Properties3
Is BaseNo
Icon
Order
20KelyphosShellState is the single source of truth for the entire shell. It's an @Observable class — pass it around freely and the shell will update automatically.
Creating State
@State private var shellState = KelyphosShellState(persistencePrefix: "myapp")
The persistencePrefix is used to namespace UserDefaults keys for automatic state persistence.
Title and Subtitle
shellState.title = "Project Name"
shellState.subtitle = "3 files modified"
On macOS these appear in the window toolbar. On iPadOS the title appears in the navigation bar.
Panel Visibility
shellState.navigatorVisible.toggle()
shellState.inspectorVisible.toggle()
shellState.utilityAreaVisible.toggle()
// Disable panels entirely
shellState.inspectorEnabled = false
shellState.utilityEnabled = false
Tab Selection
shellState.selectedNavigatorIndex = 1 // Second navigator tab
shellState.selectedInspectorIndex = 0 // First inspector tab
Appearance
shellState.vibrancyMaterial = .ultraThin // .none, .ultraThin, .thin, .regular, .thick, .ultraThick
shellState.backgroundAlpha = 0.3 // 0.0 (transparent) to 1.0 (opaque)
shellState.windowAppearance = "dark" // "auto", "light", "dark"
Appearance Presets
AppearancePreset.clear.apply(to: shellState) // Fully transparent + ultraThin
AppearancePreset.balanced.apply(to: shellState) // 50% opacity + thin
AppearancePreset.solid.apply(to: shellState) // Fully opaque, no material
Color Theme
@Environment(\.kelyphosShellState) var shellState
Text("Hello")
.foregroundStyle(shellState?.colorTheme.accent ?? .accentColor)
Customize with hex values:
shellState.colorTheme.update(variant: "dark", from: [
"accent": "#8B5CF6",
"background": "#18181B"
])
