david-swift 05dd06af0a
All checks were successful
Deploy Docs / publish (push) Successful in 2m20s
SwiftLint / SwiftLint (push) Successful in 4s
Migrate to Aparoksha Gitea instance
2024-10-14 11:25:51 +02:00

40 lines
812 B
Markdown

# Getting Started
Learn how to use the TermKit backend.
Knowledge about the Meta project is required.
Find more information [here](https://meta.aparoksha.dev).
## The App
Define your app in the following way:
```swift
import TermKitBackend
@main
struct TestApp: App {
let app = TermKitApp()
var scene: Scene {
Window {
// Views (see list in documentation)
}
.menuBar {
Menu("_File") { // Menus
Button("_New") { // Buttons
print("Hi")
}
}
}
}
}
```
## Widgets
All the available widgets can be found in the documentation.
Take a look at the [sample app](https://git.aparoksha.dev/david-swift/term-kit-backend/src/branch/main/Sources/TestApp/TestApp.swift) for more help.