SSComposeInfoBar Customization

July 12, 2024 ยท View on GitHub

You can create your own custom InfoBar using SSComposeInfoBar composable which accepts following parameters.

Parameter NameParameter TypeDescriptionDefault Value
titleTextTypeThe title of the InfoBar (Wrapper around String and AnnotatedString.N/A
titleStyleTextStyleText style of the InfoBar title.SSComposeInfoBarDefaults.defaultTitleStyle
descriptionTextType?The description of the InfoBar.null
descriptionStyleTextStyleText style of the InfoBar description.SSComposeInfoBarDefaults.defaultDescriptionStyle
customBackgroundSSCustomBackgroundBackground of the InfoBar (Wrapper around Support PNG, SVG and Color).SSComposeInfoBarDefaults.defaultSSCustomBackground
iconImageVectorIcon that will be displayed along with title and description.Icons.Default.Info
shapeShapeShape of the InfoBar.SSComposeInfoBarDefaults.shape
elevationsSSComposeInfoBarElevationElevation of the InfoBar (Wrapper around Tonal elevation and Shadow elevation.SSComposeInfoBarDefaults.elevations
contentColorsSSComposeInfoBarColorsContent colors for InfoBar content.SSComposeInfoBarDefaults.colors
contentPaddingPaddingValuesPaddingValues that will be applied to InfoBar.SSComposeInfoBarDefaults.contentPadding
heightDpHeight of the InfoBar.SSComposeInfoBarDefaults.defaultHeight
actionTextStringTitle of the action button if action is showed.SSComposeInfoBarDefaults.defaultActionTitle
onActionClicked(() -> Unit)?Callback for when user clicks the action button on InfoBar.null
onCloseClicked() -> UnitCallback for when user clicks the close icon on InfoBar.Empty Lambda
isInfiniteBooleanFlag that decides whether to show a close icon on InfoBar.false