# Material 3 (crow-material3) (https://crow.build/docs/design-systems/material3)

`crow-material3` is an **optional design system** built strictly on top of Crow core's public API (`checkCoreIndependence` and `checkDesignSystemHygiene` enforce this boundary in CI).

## Live `MaterialTheme` & Dynamic Color [#live-materialtheme--dynamic-color]

`ColorScheme` is backed by fine-grained signals. Calling `colorScheme.applyFrom(...)` recolors only the exact nodes bound to changed color roles — **zero remounting, zero state loss**, with OKLab color transitions where styled:

```kotlin
@Ui
fun AppRoot() {
    val context = appContext()
    val scheme = rememberSystemColorScheme(
        light = { dynamicLightColorScheme(context) },
        dark = { dynamicDarkColorScheme(context) },
    )

    MaterialTheme(colorScheme = scheme) {
        Surface(Modifier.fillMaxSize()) {
            MainContent()
        }
    }
}
```

On Android 12+ (API 31+), `dynamicLightColorScheme(context)` and `dynamicDarkColorScheme(context)` derive Material's full 48-role palette directly from the user's wallpaper and follow live system theme changes automatically.

## Component Catalog [#component-catalog]

Every Material 3 component wraps a core unstyled base (`ButtonBase`, `ToggleBase`, `Overlay`, `ScaffoldBase`) with composable `crow-style` styles:

- **Buttons & Actions**: `Button`, `FilledTonalButton`, `OutlinedButton`, `TextButton`, `IconButton`, `FloatingActionButton`, `SmallFloatingActionButton`, `ExtendedFloatingActionButton`, `SingleChoiceSegmentedButtonRow`, `MultiChoiceSegmentedButtonRow`, `SegmentedButton`
- **Selection & Input**: `Switch`, `Checkbox`, `RadioButton`, `Slider`, `TextField`, `OutlinedTextField` (floating notched label, prefix/suffix, error, password), `AssistChip`, `FilterChip`, `InputChip`
- **Surfaces & Navigation**: `Scaffold`, `NavigationSuiteScaffold`, `TopAppBar` (collapsing Medium/Large), `NavigationBar`, `NavigationRail`, `ModalNavigationDrawer`, `Surface` (tonal elevation), `Card`, `ElevatedCard`, `OutlinedCard`, `HorizontalDivider`, `ListItem`, `PrimaryTabRow`, `SecondaryTabRow`, `ScrollableTabRow`, `Badge`
- **Feedback & Overlays**: `AlertDialog`, `ModalBottomSheet`, `DropdownMenu`, `Snackbar`, `PlainTooltip`, `RichTooltip`, `PullToRefreshBox`, `LinearProgressIndicator`, `CircularProgressIndicator` (allocation-free `drawBehind`)

## Customizing Any Component with `+` [#customizing-any-component-with-]

Because every component's look is a `crow.style.Style` value, overriding a button or chip never requires forking the component:

```kotlin
Button(
    onClick = { submit() },
    style = style { shape(RoundedCornerShape(10.dp)) },
) {
    Text("Continue")
}
```