StylishToolbar

fun StylishToolbar(title: String? = null, modifier: Modifier = Modifier, subtitle: String? = null, titleStyle: TextStyle = MaterialTheme.typography.titleLarge, subtitleStyle: TextStyle = MaterialTheme.typography.bodySmall, contentColor: Color = MaterialTheme.colorScheme.onSurface, containerColor: Color = MaterialTheme.colorScheme.surface, shape: Shape = androidx.compose.ui.graphics.RectangleShape, tonalElevation: Dp = 0.dp, shadowElevation: Dp = 0.dp, contentPadding: PaddingValues = PaddingValues( horizontal = StylishTheme.dimensions.contentSpacing, vertical = StylishTheme.dimensions.contentSpacing / 1.5f, ), navigationContent: @Composable () -> Unit? = null, titleContent: @Composable () -> Unit? = null, actions: @Composable RowScope.() -> Unit = {})

A compact, slot-first toolbar for page actions and responsive layouts.

The title area is intentionally independent from navigation and actions: callers can provide titleContent for breadcrumbs, search, or a badge, while actions can contain any number of icon buttons. On narrow screens the title is ellipsized instead of pushing actions off-screen. The component is a molecule rather than a navigation bar, so it can be used inside cards, dialogs, and desktop panes as well as at the top of a page.

Parameters

title

Optional plain-text title. Ignored when titleContent is set.

modifier

Modifier applied to the surface.

subtitle

Optional supporting text below title.

titleStyle

Typography for the title.

subtitleStyle

Typography for the subtitle.

contentColor

Color for title and slot content.

containerColor

Toolbar background.

shape

Optional outer shape; defaults to no clipping.

tonalElevation

Tonal elevation for a surface toolbar.

shadowElevation

Shadow elevation, useful for floating toolbars.

contentPadding

Toolbar padding. Use PaddingValues to tune start, end, top, and bottom independently for platform-specific insets.

navigationContent

Optional leading slot (back button, avatar, etc.).

titleContent

Optional custom title slot. It receives no scope so it can be reused independently of the toolbar.

actions

Trailing actions, receiving RowScope for weight/alignment.