All Projects → MessiasLima → karavel

MessiasLima / karavel

Licence: MIT license
Lightweight navigation library for Compose for Desktop

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to karavel

Tachidesk-JUI
A Tachidesk Client built in Compose Multiplatform
Stars: ✭ 203 (+269.09%)
Mutual labels:  jetpack-compose, compose-desktop
D-KMP-sample
D-KMP Architecture official sample: it uses a shared KMP ViewModel and Navigation for Compose and SwiftUI apps.
Stars: ✭ 636 (+1056.36%)
Mutual labels:  jetpack-compose, compose-desktop
Jetpack-Compose-Theme-Configurator
Desktop Application to setup/configure your Jetpack Compose Color/Theme Palette
Stars: ✭ 50 (-9.09%)
Mutual labels:  jetpack-compose, compose-desktop
wordle-kt
Wordle game clone made with Kotlin & Compose
Stars: ✭ 33 (-40%)
Mutual labels:  jetpack-compose, compose-desktop
PreCompose
Compose Multiplatform Navigation && ViewModel
Stars: ✭ 150 (+172.73%)
Mutual labels:  jetpack-compose, compose-desktop
chip-8
Jetpack Compose and SwiftUI based Kotlin Multiplatform fork of https://github.com/cbeust/chip-8 (Chip-8 Emulator)
Stars: ✭ 36 (-34.55%)
Mutual labels:  jetpack-compose, compose-desktop
samples
Jetpack Compose based project, used to stress-testing compose features / integrations and explore non-trivial functionality
Stars: ✭ 21 (-61.82%)
Mutual labels:  jetpack-compose
compose-charts
Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop.
Stars: ✭ 30 (-45.45%)
Mutual labels:  jetpack-compose
CloudBook
👨🏻‍💻 An ordinary person’s technical cloud notes, share the world and record life.
Stars: ✭ 38 (-30.91%)
Mutual labels:  jetpack-compose
foodies
A clean MVVM architecture android application
Stars: ✭ 14 (-74.55%)
Mutual labels:  jetpack-compose
MovieCompose
🎞 A demo movie app using Jetpack Compose and Hilt based on modern Android tech stacks.
Stars: ✭ 322 (+485.45%)
Mutual labels:  jetpack-compose
JetComposer
Collection of UIs and Animations built with Jetpack Compose for Android
Stars: ✭ 294 (+434.55%)
Mutual labels:  jetpack-compose
monzo-widget
An Android app widget for Monzo using the public api
Stars: ✭ 25 (-54.55%)
Mutual labels:  jetpack-compose
JetExample
Jetpack Compose UI components examples
Stars: ✭ 192 (+249.09%)
Mutual labels:  jetpack-compose
PlayWeather
🔥🔥🔥 Compose、Lce、MVVM、深色模式、横屏、无网弱网适配、Room、Hilt、多语言切换,目前Android最新的库基本全用上了,你想要的都有🔥🔥🔥
Stars: ✭ 120 (+118.18%)
Mutual labels:  jetpack-compose
Compose Samples
Official Jetpack Compose samples.
Stars: ✭ 10,037 (+18149.09%)
Mutual labels:  jetpack-compose
android-dev-challenge-compose-4
Weather app done in Jetpack Compose for the #AndroidDevChallenge 2021 🌦 ☀️. Neumorphism UI.
Stars: ✭ 84 (+52.73%)
Mutual labels:  jetpack-compose
ScratchCardEffect
Scratch Card Effect in Jetpack Compose 🚀
Stars: ✭ 54 (-1.82%)
Mutual labels:  jetpack-compose
Jetpack-compose-sample
Forget about bunch of XML files for maintaining UIs. Jetpack Compose is Android’s modern toolkit for building native UI. Here is a small example to get started.
Stars: ✭ 29 (-47.27%)
Mutual labels:  jetpack-compose
TaigaMobile
Android app for Taiga agile system
Stars: ✭ 76 (+38.18%)
Mutual labels:  jetpack-compose

⛵️Karavel

Maintainability Maven Central

Karavel is a very simple and lightweight navigation library for Compose for Desktop. It creates a stack of composables and let you navigate poping and pushing on this stack.

Install

Add the dependency on you build.gradle.kts file

dependencies {
    // ...
    implementation("io.github.app-outlet:karavel:<version>")
}

Usage

import androidx.compose.runtime.Composable
import io.appoutlet.karavel.Page

// 1.  Extends the Page class
class MainPage : Page() {
    
    // 2. Override the content() method and annotate it with composable
    @Composable
    override fun content() {
        // ...Page content...
    }
}
fun main() = application {
    Window(onCloseRequest = ::exitApplication) {

        // 3. Create karavel instance passing the main page as argument
        val karavel = Karavel(MainPage())

        MaterialTheme {
            // 4. Get the current page content
            karavel.currentPage().content()
        }
    }
}
    @Composable
    override fun content() {
        Button(onClick = {
            // 5. use the karavel object to navigate
            karavel?.navigate(SettingsPage())
        }) {
            Text("Go to settings page")
        }
        
        Button(onClick = {
            // 6. use the karavel object to back to the previous screen
            karavel?.back()
        }) {
            Text("Back to previous screen")
        }
    }

License

MIT License

Copyright (c) 2021 App Outlet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].