Green Design System Android is a project that consists of two main parts:
- Component Library: A reusable library of UI components designed for Android applications. This library is distributed via GitHub Packages, making it easy to integrate into your own projects.
- Companion App: A demonstration app showcasing the components available in the library. The app provides examples of how to use the components and serves as a reference for developers.
The component library is a collection of customizable UI components designed to simplify and accelerate Android development. It is distributed as an .aar package via Maven Central Repository.
- A variety of reusable UI components.
- Fully customizable colors, styles, and behaviors.
- Designed with accessibility and performance in mind.
- Distributed via Maven Central Repository for easy integration.
To use the component library in your project, add the dependency to your build.gradle file:
dependencies {
implementation("io.github.sebopensource:components::<latest-version>")
}Note: Replace
<latest-version>with the latest version of the library.
Once installed, you can start using the components in your project. For example:
// Example usage of a Switch component
var checked by remember { mutableStateOf(true) }
GdsSwitch(
checked = checked,
onCheckedChanged = { checked = it },
style = GdsSwitchDefaults.defaultStyle()
)Refer to the Companion App for detailed examples of how to use the components.
You can also launch the DesignLibraryFragment in your app to see the components in action.
This fragment provides a visual representation of all available components and their configurations.
supportFragmentManager.beginTransaction()
.replace(R.id.fragment_container, DesignLibraryFragment())
.commit()The companion app is a showcase of the components available in the library. It demonstrates how to use the components and provides a visual reference for their appearance and behavior.
- Interactive examples of all components.
- A clean and intuitive UI for browsing components.
- Clone the repository:
git clone git@github.com:seb-oss/green-android.git-
Open the project in Android Studio.
-
Select the
appmodule and run it on an emulator or physical device.
To build the project locally:
- Ensure you have Java 17 installed.
- Run the following command to build the library and the app:
./gradlew buildContributions are welcome! If you would like to contribute to the project:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.