term-kit-backend/Sources/TermKitBackend/TermKitBackend.docc/GettingStarted.md

41 lines
849 B
Markdown
Raw Normal View History

2024-07-19 23:41:19 +02:00
# Getting Started
Learn how to use the TermKit backend.
Knowledge about the Meta project is required.
2024-07-20 09:27:02 +02:00
Find more information [here](https://aparokshaui.github.io/Meta/).
2024-07-19 23:41:19 +02:00
## The App
Define your app in the following way:
```swift
import TermKitBackend
@main
struct TestApp: App {
let id = "io.github.AparokshaUI.TestApp"
var 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://github.com/david-swift/TermKitBackend/blob/main/Sources/TestApp/TestApp.swift) for more help.