LinX64 / Reusable

๐Ÿ“˜ Reusable Components Library for Jetpack Compose - Stop rewriting or copy-pasting the same code from the previous projects!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

master CI develop CI Maven Central

๐Ÿš€๐Ÿ“˜ Reusable Components library for Compose

This library is a treasure trove of reusable components tailored for Jetpack Compose, designed to simplify the creation of complex interfaces. It's your go-to toolkit for crafting visually stunning UIs effortlessly. So, let's cut to the chase and unleash the magic! ๐Ÿ˜ƒ

banner

Installation

To use the library, add the following line of code to your build.gradle file if you are using Kotlin DSL:

implementation("io.github.linx64:reusablecomponents:<version>")

Groovy:

implementation 'io.github.linx64:reusablecomponents:<version>'

Version Catalog:

reusable-components = <version>
reusableComponents = { group = "io.github.linx64", name = "reusablecomponents", version.ref = "reusable-components" }

Components

Currently, the library contains the following components:

Usage

Using the components is very simple. Just add the library to your project and based on your need, let's say you want to have a Scrollable screen with a few Buttons:

ScrollableScreen {
    Text(
        modifier = Modifier.align(Alignment.CenterHorizontally),
        text = "Here is the Home Screen!"
    )
    FillHeightSpacer()
    FillHorizontalHeight()
    PrimaryButton(text = R.string.app_name, onClick = {})
    FillHorizontalHeight()
    PrimaryButton(text = R.string.app_name, onClick = {})
    FillHorizontalHeight()
    SecondaryButton(text = R.string.app_name, onClick = {})
}

And that's it! You have a scrollable screen with a few buttons.

You can customize the container by passing your modifier to it. The same goes for the buttons.

Important note: To use the Preview components, you'll need to add your theme first, then use the components to create your UI.

๐Ÿ™‹โ€Contributing

Please read contribution guidelines for more information regarding contribution.

License

This library is licensed under the Apache 2.0 License. See the LICENSE file for more information.

About

๐Ÿ“˜ Reusable Components Library for Jetpack Compose - Stop rewriting or copy-pasting the same code from the previous projects!

License:Apache License 2.0


Languages

Language:Kotlin 100.0%