2025-03-04 22:44:07 +01:00

102 lines
2.6 KiB
Markdown

+++
+++
<div class="banner-light">
{{ image(url="light.png", alt="Some windows on different platforms." transparent=true no_hover=true) }}
</div>
<div class="banner-dark">
{{ image(url="dark.png", alt="Some windows on different platforms." transparent=true no_hover=true) }}
</div>
# Native. Cross-platform. <div class="logo"> Aparoksha. </div>
Create your next cross-platform app with Aparoksha to give it a native look on each platform.
Aparoksha is easy-to-use, safe, and <i>aparoksha</i>, meaning that its reactive and declarative approach as well as the clean syntax significantly enhance the readability.
<br>
{% alert(warning=true) %}
This project is currently under development and not yet ready for production.
Follow the project [on the Fediverse](https://mastodon.de/@aparoksha) to stay up to date.
{% end %}
<br>
## Start with Simple Views
A view is a piece of the user interface.
Create your own views, such as `Avatar`, `Post`, and `Timeline`.
Combine them into pages, windows, and apps.
<!---
<aside>
{{ image(url="trailer.gif" transparent=true) }}
</aside>
--->
```swift
struct Timeline: View {
var posts: Posts
var view: Body {
ForEach(posts) { post in
Avatar(user: post.user)
Post(post: post)
}
}
}
```
## The Magic of the State
Each of your views has the ability to store state throughout view updates.
Let's create a simple counter view:
<!---
<aside>
{{ image(url="trailer.gif" transparent=true) }}
</aside>
--->
```swift
struct SearchView: View {
@State private var count = 0
var view: Body {
Button(icon: .minus) {
count -= 1
}
Text("\(count)")
Button(icon: .plus) {
count += 1
}
}
}
```
## Supported Platforms
Aparoksha's goal is to enable you to bring your app to as many users as possible on completely different platforms.
Therefore, it is built in an open and extensible way.
Creating a backend for a new platform is almost as simple as creating an app!
<br>
<div class="buttons" style="margin-top: 0;">
<a href="https://meta.aparoksha.dev/documentation/meta/createbackend">Create a Backend</a>
</div>
<br>
A list of some backends is available [here](@/backends/_index.md). They can be combined with Aparoksha in a simple way.
Aparoksha itself currently supports [GNOME](@/backends/Adwaita/index.md) and [Windows](@/backends/WinUI/index.md).
What makes the Aparoksha project unique is that each backend is a fully independent project, optimized for its platform.
In a cross-platform app, you can leverage the full potential of the individual backends by writing platform-specific bits of code.