Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LinX64/Reusable
π Reusable Components Library for Jetpack Compose - Stop rewriting or copy-pasting the same code from the previous projects!
https://github.com/LinX64/Reusable
android compose-ui jetpack-compose
Last synced: 9 days ago
JSON representation
π Reusable Components Library for Jetpack Compose - Stop rewriting or copy-pasting the same code from the previous projects!
- Host: GitHub
- URL: https://github.com/LinX64/Reusable
- Owner: LinX64
- License: apache-2.0
- Created: 2024-04-03T22:19:17.000Z (8 months ago)
- Default Branch: develop
- Last Pushed: 2024-10-31T19:00:39.000Z (15 days ago)
- Last Synced: 2024-10-31T20:16:59.415Z (15 days ago)
- Topics: android, compose-ui, jetpack-compose
- Language: Kotlin
- Homepage:
- Size: 243 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - LinX64/Reusable - π Reusable Components Library for Jetpack Compose - Stop rewriting or copy-pasting the same code from the previous projects! (Kotlin)
README
# ππ 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! π## Installation
To use the library, add the following line of code to your `build.gradle` file if you are using
Kotlin DSL:```Kotlin
implementation("io.github.linx64:reusablecomponents:")
```Groovy:
```Groovy
implementation 'io.github.linx64:reusablecomponents:'
```Version Catalog:
```Kotlin-dsl
reusable-components =
reusableComponents = { group = "io.github.linx64", name = "reusablecomponents", version.ref = "reusable-components" }
```## Components
Currently, the library contains the following components:
- [Containers](https://github.com/LinX64/Reusable/tree/develop/reusablecomponents/src/main/kotlin/com/client/reusablecomponents/containers)
- [Buttons](https://github.com/LinX64/Reusable/tree/develop/reusablecomponents/src/main/kotlin/com/client/reusablecomponents/buttons)
- [Columns](https://github.com/LinX64/Reusable/blob/develop/reusablecomponents/src/main/kotlin/com/client/reusablecomponents/containers/CenteredColumn.kt)
- [Previews](https://github.com/LinX64/Reusable/tree/develop/reusablecomponents/src/main/kotlin/com/client/reusablecomponents/previews)
- [Spacers](https://github.com/LinX64/Reusable/tree/develop/reusablecomponents/src/main/kotlin/com/client/reusablecomponents/spacers)
- Other necessary components will be added soon.## 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:```kotlin
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](CONTRIBUTING.md) for more information regarding contribution.
## License
This library is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for more
information.