API Reference

KelyphosPanel

Protocol for type-safe panel tab definitions
Properties3
Is BaseNo
Iconi-lucide-puzzle
Order30

KelyphosPanel is the protocol that panel tab enums conform to. It combines an identifier, display metadata, and a SwiftUI view body.

Declaration

protocol KelyphosPanel: Identifiable, CaseIterable, View {
    var id: String { get }
    var title: String { get }
    var systemImage: String { get }
}

Conformance Requirements

RequirementNotes
id: StringMust be nonisolated — used for UserDefaults persistence keys
title: StringMust be nonisolated — displayed in tab bar and keybindings overlay
systemImage: StringMust be nonisolated — SF Symbol name
body: some ViewThe panel's content view
CaseIterableRequired so Array(MyTab.allCases) works in KelyphosShellConfiguration

Example

enum MyNavigatorTab: String, KelyphosPanel, CaseIterable {
    case files, search, bookmarks

    nonisolated var id: String { rawValue }

    nonisolated var title: String {
        switch self {
        case .files: "Files"
        case .search: "Search"
        case .bookmarks: "Bookmarks"
        }
    }

    nonisolated var systemImage: String {
        switch self {
        case .files: "folder"
        case .search: "magnifyingglass"
        case .bookmarks: "bookmark"
        }
    }

    var body: some View {
        switch self {
        case .files: FilesNavigatorView()
        case .search: SearchNavigatorView()
        case .bookmarks: BookmarksNavigatorView()
        }
    }
}