TitleBar

Functions summary

Unit
@Composable
TitleBar(
    startIcon: ImageProvider,
    title: String,
    iconColor: ColorProvider?,
    textColor: ColorProvider,
    modifier: GlanceModifier,
    fontFamily: FontFamily?,
    actions: @Composable RowScope.() -> Unit
)

A Title Bar.

Functions

TitleBar

@Composable
fun TitleBar(
    startIcon: ImageProvider,
    title: String,
    iconColor: ColorProvider? = GlanceTheme.colors.onSurface,
    textColor: ColorProvider = GlanceTheme.colors.onSurface,
    modifier: GlanceModifier = GlanceModifier,
    fontFamily: FontFamily? = null,
    actions: @Composable RowScope.() -> Unit = {}
): Unit

A Title Bar. Contains an Icon, Text, and actions. Intended to be placed at the top of a widget.

Parameters
startIcon: ImageProvider

A tintable icon representing your app or brand.

title: String

Text to be displayed. Generally the name of your widget or app. Title should be shortened or omitted when the widget's width is narrow. The width can be checked using LocalSize.current.width

iconColor: ColorProvider? = GlanceTheme.colors.onSurface

The color which startIcon will be tinted.

textColor: ColorProvider = GlanceTheme.colors.onSurface

The color which title will be tinted.

modifier: GlanceModifier = GlanceModifier

GlanceModifier.

fontFamily: FontFamily? = null

Optional override for title's font family. Leave null to use the default.

actions: @Composable RowScope.() -> Unit = {}

A slot api for buttons. Use CircleIconButton with backgroundColor = null. Buttons will be placed in a Row.