# MaterialTheme

> MaterialTheme from Material Compose (`androidx.compose.material:material`) for Jetpack Compose, with a code sample.

- Library: [Material Compose](https://composables.com/material-components/material-compose.md)
- API reference and more examples: [MaterialTheme](https://composables.com/jetpack-compose/androidx.compose.material/material/components/MaterialTheme/api.md)

## Code

```kotlin
@Composable
fun MaterialThemeSample() {
    val lightColors = lightColors(primary = Color(0xFF1EB980))

    val darkColors = darkColors(primary = Color(0xFF66ffc7))

    val colors = if (isSystemInDarkTheme()) darkColors else lightColors

    val typography =
        Typography(
            h1 = TextStyle(fontWeight = FontWeight.W100, fontSize = 96.sp),
            button = TextStyle(fontWeight = FontWeight.W600, fontSize = 14.sp),
        )

    MaterialTheme(colors = colors, typography = typography) {
        val currentTheme = if (MaterialTheme.colors.isLight) "light" else "dark"
        ExtendedFloatingActionButton(
            text = { Text("FAB with text style and color from $currentTheme theme") },
            onClick = {},
        )
    }
}
```
