Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devrath/Material-3-Design-Kit
ποΈ πππ ππππππππππ’ ππππππππ πππππππππππ πππ ππππ πππππππ πππππππππ πππ ππππππππ-πΉ ππππππ ππππππππππ ππ’ ππππππ
https://github.com/devrath/Material-3-Design-Kit
android design jetpack-android jetpack-compose jetpackcompose kotlin kotlin-android material-components material-design material-ui material3 material3-android materialdesign theme
Last synced: 3 months ago
JSON representation
ποΈ πππ ππππππππππ’ ππππππππ πππππππππππ πππ ππππ πππππππ πππππππππ πππ ππππππππ-πΉ ππππππ ππππππππππ ππ’ ππππππ
- Host: GitHub
- URL: https://github.com/devrath/Material-3-Design-Kit
- Owner: devrath
- License: apache-2.0
- Created: 2023-02-11T14:49:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T08:18:23.000Z (over 1 year ago)
- Last Synced: 2024-08-01T19:51:36.074Z (6 months ago)
- Topics: android, design, jetpack-android, jetpack-compose, jetpackcompose, kotlin, kotlin-android, material-components, material-design, material-ui, material3, material3-android, materialdesign, theme
- Language: Kotlin
- Homepage:
- Size: 127 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-list - devrath/Material-3-Design-Kit - ποΈ πππ ππππππππππ’ ππππππππ πππππππππππ πππ ππππ πππππππ πππππππππ πππ ππππππππ-πΉ ππππππ ππππππππππ ππ’ ππππππ (Kotlin)
README
![cover](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/Banner.png)
πΆπππππ-πΌπππππππ-π³πππππ-πΉ
πππ ππππππππππ’ ππππππππ πππππππππππππ πππππππππππ ππ πππ ππ πππππππππππ’ ππππππ£π πΌπππππππ-πΉ π πππππ πππ πΉππππππ π²ππππππ ππππππ πππ. πΈπ ππππππ π π πππππ ππ ππππ πππππ πππ πππππππππ ππππ πππππππ ππππ ππππππππππ πππ ππππππππππ ππ πππ πΌπππππππ-πΉ ππππππ, ππππππππ’ ππππππππππ ππ’ πΆπππππ. π±π’ ππ‘πππππππ ππππ ππππππππππ’, ππππππππππ πππ ππππ π ππππ πππππππππππππ ππ πππ πππππππππππ ππ πππππππππππππ πΌπππππππ-πΉ ππππ πππππ ππππππππ πππ πππππππ πππππ πππππππ’ ππ ππππππ ππππππππ’ πππππππππ πππ ππππππππ ππππ ππππππππππ.
| **`Contents`** |
| -------------- |
| [πΌππππππππΉ π°ππππππ ππππππ π²πππππππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9F%B9-%F0%9D%99%B0%F0%9D%9A%97%F0%9D%9A%8D%F0%9D%9A%9B%F0%9D%9A%98%F0%9D%9A%92%F0%9D%9A%8D-%F0%9D%9A%86%F0%9D%9A%92%F0%9D%9A%8D%F0%9D%9A%90%F0%9D%9A%8E%F0%9D%9A%9D-%F0%9D%99%B2%F0%9D%9A%98%F0%9D%9A%96%F0%9D%9A%99%F0%9D%9A%98%F0%9D%9A%97%F0%9D%9A%8E%F0%9D%9A%97%F0%9D%9A%9D%F0%9D%9A%9C) |
| [π°ππππ πΌπππππππ-πΉ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B0%F0%9D%9A%8B%F0%9D%9A%98%F0%9D%9A%9E%F0%9D%9A%9D-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95-%F0%9D%9F%B9) |
| [π³π’πππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B3%F0%9D%9A%A2%F0%9D%9A%97%F0%9D%9A%8A%F0%9D%9A%96%F0%9D%9A%92%F0%9D%9A%8C-%F0%9D%99%B2%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [π²ππ π π πππππππ πππππ ππ’πππππ ππππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B2%F0%9D%9A%8A%F0%9D%9A%97-%F0%9D%9A%A0%F0%9D%9A%8E-%F0%9D%9A%8D%F0%9D%9A%92%F0%9D%9A%9C%F0%9D%9A%8A%F0%9D%9A%8B%F0%9D%9A%95%F0%9D%9A%8E-%F0%9D%9A%9D%F0%9D%9A%91%F0%9D%9A%8E%F0%9D%9A%9C%F0%9D%9A%8E-%F0%9D%9A%8D%F0%9D%9A%A2%F0%9D%9A%97%F0%9D%9A%8A%F0%9D%9A%96%F0%9D%9A%92%F0%9D%9A%8C-%F0%9D%9A%8C%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [π³ππππππππππ ππππππππ ππππ πΌππππππππΈ ππ πΌππππππππΉ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B3%F0%9D%9A%92%F0%9D%9A%8F%F0%9D%9A%8F%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%8E%F0%9D%9A%97%F0%9D%9A%8C%F0%9D%9A%8E%F0%9D%9A%9C-%F0%9D%9A%98%F0%9D%9A%8B%F0%9D%9A%9C%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%9F%F0%9D%9A%8E%F0%9D%9A%8D-%F0%9D%9A%8F%F0%9D%9A%9B%F0%9D%9A%98%F0%9D%9A%96-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9F%B8-%F0%9D%9A%9D%F0%9D%9A%98-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9F%B9) |
| [πΈππππππππ πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B8%F0%9D%9A%96%F0%9D%9A%99%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9D%F0%9D%9A%8A%F0%9D%9A%97%F0%9D%9A%9D-%F0%9D%9A%95%F0%9D%9A%92%F0%9D%9A%97%F0%9D%9A%94%F0%9D%9A%9C) |
| [π²ππππ ππ’ππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B2%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B-%F0%9D%9A%82%F0%9D%9A%A2%F0%9D%9A%9C%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%96) |
| [π·ππ ππ πππ ππππππ πππππ ππππππππ πππ πΌπππππππ-πΉ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B7%F0%9D%9A%98%F0%9D%9A%A0-%F0%9D%9A%9D%F0%9D%9A%98-%F0%9D%9A%9E%F0%9D%9A%9C%F0%9D%9A%8E-%F0%9D%9A%90%F0%9D%9A%98%F0%9D%9A%98%F0%9D%9A%90%F0%9D%9A%95%F0%9D%9A%8E-%F0%9D%9A%9D%F0%9D%9A%91%F0%9D%9A%8E%F0%9D%9A%96%F0%9D%9A%8E-%F0%9D%9A%9C%F0%9D%9A%8E%F0%9D%9A%95%F0%9D%9A%8E%F0%9D%9A%8C%F0%9D%9A%9D%F0%9D%9A%98%F0%9D%9A%9B-%F0%9D%9A%8F%F0%9D%9A%98%F0%9D%9A%9B-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95-%F0%9D%9F%B9) |
| [ππππππ πππππ ππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%9A%82%F0%9D%9A%8A%F0%9D%9A%96%F0%9D%9A%99%F0%9D%9A%95%F0%9D%9A%8E-%F0%9D%9A%9D%F0%9D%9A%91%F0%9D%9A%8E%F0%9D%9A%96%F0%9D%9A%8E-%F0%9D%9A%8F%F0%9D%9A%92%F0%9D%9A%95%F0%9D%9A%8E) |
| [ππ’ππππππππ’ ππ πΌππππππππΉ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%9A%83%F0%9D%9A%A2%F0%9D%9A%99%F0%9D%9A%98%F0%9D%9A%90%F0%9D%9A%9B%F0%9D%9A%8A%F0%9D%9A%99%F0%9D%9A%91%F0%9D%9A%A2-%F0%9D%9A%92%F0%9D%9A%97-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9F%B9) |
| [ππππππ ππ πΌππππππππΉ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%9A%82%F0%9D%9A%91%F0%9D%9A%8A%F0%9D%9A%99%F0%9D%9A%8E%F0%9D%9A%9C-%F0%9D%9A%92%F0%9D%9A%97-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9F%B9) |
| [π΄ππππππππ ππ πΌππππππππΉ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B4%F0%9D%9A%95%F0%9D%9A%8E%F0%9D%9A%9F%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%92%F0%9D%9A%98%F0%9D%9A%97-%F0%9D%9A%92%F0%9D%9A%97-%F0%9D%99%BC%F0%9D%9A%8A%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9F%B9) |
## `πΌππππππππΉ π°ππππππ ππππππ π²πππππππππ`| **`π²πππππππ`** |
| -------------- |
| [`πΌππππππππΉ β π±ππππππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-Buttons) |
| [`πΌππππππππΉ β πππ‘ππ΅ππππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-TextField) |
| [`πΌππππππππΉ β πππππππππ ππΈ ππππππππππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-Selection-UI-components) |
| [`πΌππππππππΉ β ππ ππππππ πππ πππ π`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-Swipable-Tab-Rows) |
| [`πΌππππππππΉ - πππππππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-Toolbar) |
| [`πΌππππππππΉ - π±πππππ π½πππππππππ π±ππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-Bottom-Navigation-Bar) |
| [`πΌππππππππΉ - π±πππππ πππππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-Bottom-Sheet) |
| [`πΌππππππππΉ - π΄π‘ππππππ³ππππ³ππ π πΌπππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-ExposedDropDown-Menu) |
| [`πΌππππππππΉ β π°πππππ³πππππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-AlertDialog) |
| [`πΌππππππππΉ β π±ππππππ°πππ±ππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-BottomAppBar) |
| [`πΌππππππππΉ β π½ππππππππππ³πππ ππ`](https://github.com/devrath/Material-3-Design-Kit/wiki/Material3-%E2%80%90-NavigationDrawer) || **`Light Theme Demo`** | **`Dark Theme Demo`** |
| ---------------- | ------------------ |
| [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/-PXyyFDP6oY/0.jpg)](https://www.youtube.com/watch?v=-PXyyFDP6oY) | [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/kYTOhWQerrQ/0.jpg)](https://www.youtube.com/watch?v=kYTOhWQerrQ) |
## `π°ππππ πΌπππππππ-πΉ`
* It is the new standard way of building the UI that Google recommends.
* In the past till now we used to use material-2 and the material-3 comes with new features
* A good feature that comes with material-3 is dynamic colors## `π³π’πππππ π²πππππ`
* In android-12, we will know about these dynamic colors
* Android takes wallpaper or the color that you define as your wallpaper and generates a color theme around that. So all the apps that use material themes will generate your own theme based on the color of the wallpaper for your app## `π²ππ π π πππππππ πππππ ππ’πππππ ππππππ`
* Yes this is optional, we can disable our application if this doesn't suit our design.## `π³ππππππππππ ππππππππ ππππ πΌππππππππΈ ππ πΌππππππππΉ`
| `πΌππππππππΈ` | `πΌππππππππΉ` |
| ------------ | ------------ |
| In the theme file we refer function blocks as `lightColors` and `darkColors` | In the theme file we refer function blocks as `lightColorScheme` and `darkColorScheme`|
| There is a `primary variant` color | `primary variant` color is not there but `primary`,`secondary`,`tertiary` color is present |
| Dynamic colors are not present | Dynamic colors are present |## `πΈππππππππ πππππ`
| **`πΈππππππππ πππππ`** |
| ----------------- |
| [πΌπππππππ-πΉ](https://m3.material.io/) |
| [π²ππππ ππ’ππππ](https://m3.material.io/styles/color/the-color-system/key-colors-tones) |
| [π³ππππππππ ππππππ πππ πππππ ππ ππππ ππππ ππ π ππππππ](https://m3.material.io/styles/color/the-color-system/color-roles) |
| [πΌπππππππ πππππ π±ππππππ](https://m3.material.io/theme-builder#/dynamic) |
| [πΌππππππππ ππππ πΌπππππππ-πΈ ππ πΌπππππππ-πΉ](https://material.io/blog/migrating-material-3) |
## `π²ππππ ππ’ππππ`
| `π²ππππ ππ’ππππ π²πππππππ` |
| --------------------- |
| [πΊππ’ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%BA%F0%9D%9A%8E%F0%9D%9A%A2-%F0%9D%99%B2%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [π°πππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B0%F0%9D%9A%8C%F0%9D%9A%8C%F0%9D%9A%8E%F0%9D%9A%97%F0%9D%9A%9D-%F0%9D%99%B2%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B) |
| [π½ππππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%BD%F0%9D%9A%8E%F0%9D%9A%9E%F0%9D%9A%9D%F0%9D%9A%9B%F0%9D%9A%8A%F0%9D%9A%95-%F0%9D%9A%8C%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [π΄ππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B4%F0%9D%9A%9B%F0%9D%9A%9B%F0%9D%9A%98%F0%9D%9A%9B-%F0%9D%9A%8C%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [πΏππππππ-ππππππππ ππππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%BF%F0%9D%9A%9B%F0%9D%9A%98%F0%9D%9A%8D%F0%9D%9A%9E%F0%9D%9A%8C%F0%9D%9A%9D-%F0%9D%9A%9C%F0%9D%9A%99%F0%9D%9A%8E%F0%9D%9A%8C%F0%9D%9A%92%F0%9D%9A%8F%F0%9D%9A%92%F0%9D%9A%8C-%F0%9D%9A%8C%F0%9D%9A%9E%F0%9D%9A%9C%F0%9D%9A%9D%F0%9D%9A%98%F0%9D%9A%96-%F0%9D%9A%8C%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [πΈππππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%B8%F0%9D%9A%97%F0%9D%9A%9F%F0%9D%9A%8E%F0%9D%9A%9B%F0%9D%9A%9C%F0%9D%9A%8E-%F0%9D%9A%8C%F0%9D%9A%98%F0%9D%9A%95%F0%9D%9A%98%F0%9D%9A%9B%F0%9D%9A%9C) |
| [π½ππππππ π²πππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/README.md#%F0%9D%99%BD%F0%9D%9A%8E%F0%9D%9A%9E%F0%9D%9A%9D%F0%9D%9A%9B%F0%9D%9A%8A%F0%9D%9A%95-%F0%9D%9A%9F%F0%9D%9A%8A%F0%9D%9A%9B%F0%9D%9A%92%F0%9D%9A%8A%F0%9D%9A%97%F0%9D%9A%9D) |
### [`πΊππ’ π²πππππ`](https://m3.material.io/styles/color/the-color-system/key-colors-tones#d8394c19-be38-490f-8eb4-192ec2a8d1cb)
![KeyColors](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/primary_key_color.png)
| `πΊππ’ π²ππππ π½πππ` | `π³ππππππππππ ππ π ππππ ππ πππ` |
| ------------------- | ----------------------------- |
| Primary Key Color | This is something bright and something that stands out, Say action button etc that enables user to click on it |
| Secodary Key Color | This is usually based on primary key color that need to stand out but not as much as primary color |
| Tertiary Key Color | This is same as primary and secondary but next lighter action |### [`π°πππππ π²ππππ`](https://m3.material.io/styles/color/the-color-system/key-colors-tones#5b4f0cd4-beb7-41b1-b6ff-a952fcbea726)
![Accent Colors](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/accent_colors.png)
| `π°πππππ π²ππππ π½πππ` | `π³ππππππππππ ππ π ππππ ππ πππ` |
| ------------------- | ----------------------------- |
| On Primary | This is a color that is on top of `primary color`. Say if a action button is there with `primary color`, the `plus symbol` on it will be `on primary` |
| Primary Container | This is a color similar to `primary color`, Now we use this say a background for the floating action button. |
| On Primary Container | This will the `plus symbol` color on the `primary container` color |
### [`π½ππππππ ππππππ`](https://m3.material.io/styles/color/the-color-system/key-colors-tones#6f490a8e-8e76-4fc7-9257-c13912a891de)
![π½ππππππ ππππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/nutral_colors.png)
| `π½ππππππ π²ππππ π½πππ` | `π³ππππππππππ ππ π ππππ ππ πππ` |
| -------------------- | ----------------------------- |
| Background | This will the color of the background, In case of list the padding area part that seperates list item from screen |
| OnBackground | This will be if any color needs to be added on top of the `background` but out side the surface |
| Surface | This will be the background color of the card view in a list |
| OnSurface | This will be the color, if any view is added that has a background on top of the `surface` |
### [`π΄ππππ ππππππ`](https://m3.material.io/styles/color/the-color-system/key-colors-tones#e14ecb3a-cd4c-41c6-873c-9313128b762a)
![π΄ππππ ππππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/error_colors.png)| `π΄ππππ π²ππππ π½πππ` | `π³ππππππππππ ππ π ππππ ππ πππ` |
| -------------------- | ----------------------------- |
| Error | Usually we show error in this color, Say Snackbar indicating background color |
| On Error | This color will be the text or icon color on top of `error` background color |
| Error Container | This will be the background of say dialog that is displayed as error |
| On Error Container | Again this will be the content that is displayed on top of `error container` color |
### [`πΏππππππ-ππππππππ ππππππ ππππππ`](https://m3.material.io/styles/color/the-color-system/key-colors-tones#cabaac72-7db9-4582-b686-1143aa4d09b2)
* This is basically the branding colors that we use are specifc to app, In Such a scenario, we use these custom specific colors### [`πΈππππππ ππππππ`](https://m3.material.io/styles/color/the-color-system/color-roles#b9dcd3da-b7fc-491d-a244-e0485d65c20c)
![πΈππππππ ππππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/inverse_roles.png)
* This is used for some elements that is displayed on top of other surfaces.
* Used on top of the widgets such as snackbar### [`π½ππππππ πππππππ`](https://m3.material.io/styles/color/the-color-system/color-roles#afa8276f-e572-4940-a7ee-e016c81b3889)
![π½ππππππ πππππππ](https://github.com/devrath/Material-3-Design-Kit/blob/main/Assets/neutral_varient.png)
* Used on the borders of widgets and the content of it## `π·ππ ππ πππ ππππππ πππππ ππππππππ πππ πΌπππππππ-πΉ`
* There are 2 types `Dynamic` and `Custom`.
* `Dynamic` is used to get the colors based on a image.
* `Custom` is used to define colors based on a specific color.
* In the [custom colors option](https://m3.material.io/theme-builder#/custom) we choose a primary color and based on the primary color the algorithm selects other colors, We can even give a specific touches for it.## `ππππππ πππππ ππππ`
```kotlin
@Composable
fun MaterialAppTheme(
// Flag to determine the dark/light theme
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
// Parent most top level composable
content: @Composable () -> Unit
) {
// We need context here because the support for dynamic colors comes from android system
val context = LocalContext.current
val view = LocalView.current// We can apply one of four different color scheme's depending on what type of device the user has.
// CONDITION-1:-> If the user is running on android-12 and above, We need to use dynamic colors.
// CONDITION-2:-> If the user is running on device prior to android-12, We will use normal material-2 theme.
// CONDITION-3:-> If the user again is using light theme, then we use light colors else use dark colors.
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
// CONDITION-1:-> If the user is running on android-12 and above, We need to use dynamic colors.
if (darkTheme){
// CONDITION-3:-> If the user again is using dark theme, then we use dark colors.
dynamicDarkColorScheme(context)
} else {
// CONDITION-3:-> If the user again is using light theme, then we use light colors.
dynamicLightColorScheme(context)
}
}
darkTheme -> {
// CONDITION-1:-> If the user is running on below android-12, We need to use material-2 colors.
// CONDITION-3:-> If the user again is using dark theme, then we use dark colors.
DarkColors
}
else -> {
// CONDITION-1:-> If the user is running on below android-12, We need to use material-2 colors.
// CONDITION-3:-> If the user again is using light theme, then we use light colors.
LightColors
}
}// Set the color for the status bar
if (!view.isInEditMode) {
/* getting the current window by tapping into the Activity */
val currentWindow = (view.context as? Activity)?.window
?: throw Exception("Not in an activity - unable to get Window reference")SideEffect {
/* the default code did the same cast here - might as well use our new variable! */
currentWindow.statusBarColor = colorScheme.primary.toArgb()
/* accessing the insets controller to change appearance of the status bar, with 100% less deprecation warnings */
WindowCompat.getInsetsController(currentWindow, view).isAppearanceLightStatusBars =
darkTheme
}
}MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content
)
}
```## `ππ’ππππππππ’ ππ πΌππππππππΉ`
* Before `Material 3`, there were `6 Headline variations`, `2 Subtitle variations`, `2 Body variations`, `Button`, `Caption`, and `Overline styles`.
* How to use `headline`,`title`,`body`,`label`, etc. [More details on android documentation](https://m3.material.io/styles/typography/applying-type).
* In `Material 3`, there is a more regular and smaller number of variants for each classification, namely `Small`, `Medium`, and `Large`.| **`π²πππππππππ ππ πΌππππππππΈ πππ πΌππππππππΉ πππ£ππ πππ πππππ ππππππππππ`** |
| --------------------------------------------------------------- |
| |## `ππππππ ππ πΌππππππππΉ`
* [Android documentation](https://m3.material.io/styles/shape/shape-scale-tokens)## `π΄ππππππππ ππ πΌππππππππΉ`
* [Android documentation](https://m3.material.io/styles/elevation/overview)## **`πππππππ`** β
If you feel like support me a coffee for my efforts, I would greatly appreciate it.## **`π²πππππππππ`** πββοΈ
Read [contribution guidelines](CONTRIBUTING.md) for more information regarding contribution.## **`π΅πππππππ`** βοΈ
Feature requests are always welcome, [File an issue here](https://github.com/devrath/Material-3-Design-Kit/issues/new).## **`π΅πππ ππππ πππππππ ππππππ`** ? β€οΈ
Support it by clicking the β button on the upper right of this page. βοΈ## **`π»ππππππ`** ![Licence](https://img.shields.io/github/license/google/docsy) :credit_card:
This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/devrath/Material-3-Design-Kit/blob/main/LICENSE) file for details