Modifiers and utilities
See Primitives for components or Core for operating-system information.
Conditional modifiers
Use Modifier.thenIf to append a modifier when a condition is true. Preserve the order that determines layout, clipping, background, and the hit area.
Modifier
.fillMaxWidth()
.thenIf(showBackground) {
background(SaltTheme.colors.subBackground)
}Modifier.onPointerEventCompat adapts pointer events across platforms. Prefer built-in controls when you need touch, pointer, and keyboard support.
Padding
Modifier.innerPadding() uses the theme's content spacing. Item components already include their own layout. In a BasicScreen, use the supplied content padding.
Window insets
Use WindowInsets.safeMain, safeMainIgnoringVisibility, or safeMainCompat when building a custom layout that needs its own inset handling. Use container-provided padding when available.
Interaction and color
| API | Use |
|---|---|
AlphaIndication | An optional opacity-based indication. The theme defaults to ripple. |
| Clickable extensions | Interaction helpers that work with SaltUI feedback. |
Edge | An edge direction, for example in overscroll configuration. |
SaltPalette | Preset colors. For app UI prefer semantic roles in SaltTheme.colors. |
UnstableSaltUiApi | Marks unstable UI APIs. |
See the UI module source for declarations and platform availability.