Installation

Get started with our KomoUI component library by following these simple installation steps.

Prerequisites

Before you begin, make sure your project using Kotlin 2.2.0

Installation Steps

Update gradle dependency

Update your build.gradle by adding KomoUI Maven

dependencies {
    implementation 'io.github.derangga:komoui:komoui_version'
}

Replace existing theme with KomoTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            KomoTheme {
                // rest of your screen navigation or components
            }
        }
    }
}

Add components

import com.komoui.components.Button
import com.komoui.components.Input
 
@Composable
fun ExampleInput() {
    Column(
        modifier = Modifier
            .fillMaxWidth()
            .padding(innerPadding)
    ) {
        var nameTxt by remember { mutableStateOf("John Doe") }
        Text(
            text = "Name",
            fontWeight = FontWeight.SemiBold,
            color = MaterialTheme.styles.foreground
        )
        Input(
            value = nameTxt,
            onValueChange = { nameTxt = it },
            placeholder = "Enter your name",
            singleLine = true
        )
        Button(onClick = {}) {
            Text("Save")
        }
    }
}
Edit this page on GitHub