Appbar

AppBars are navigational UI elements providing easy access to various functions, menus, or tools within an application.

TypeResource
DesignFigma
MobileWeb Storybook
CodeGitlab

Appbar Preview

Usage

import id.co.biofarma.binduiandroid.components.appbars.Appbars
AppBars(
  alignment = AppBarAlignment.LEFT.value,
  variant = AppBarVariant.PRIMARY.value,
  onNavigationClick = {},
  title = "App Title",
  subtitle = "App Sub Title",
  leading = {
    Avatar(
      imageUrl = "https://reqres.in/img/faces/2-image.jpg",
      type = AvatarType.PHOTO.value,
      )
    },
    actions = listOf({
      Icon(
          imageVector = BindIcons.Edit.Lined.More-one,
          contentDescription = "More",
          modifier = Modifier.clickable {}
      )
    }
  )
)
 

Examples

Variant (optional)

Use variant to determine the background color of App Bar.

App Bar Example Variant


Alignement (optional)

Use alignment to adjust the position of the title.

App-bar Example Type


Title and Sub Title

A title for the App bar component is required. As for the sub title, it is optional.

App Bar Example Title

Mode (optional)

Use mode to use dark or light

App Bar Example Mode


Props

PropsRequiredDefaultTypedescription
idfalse-stringA unique identifier for the avatar.
varianttrueprimaryprimary, neutralUnique identifier for avatar with a specific color.
alignmenttrueleftleft, center,Alignment for the title 7 sub title
modefalselightlight darkThe theme mode of the avatar (light or dark).
titletrue”title”stringCustom styles for the avatar component.
subtitlefalse”sub title”stringA unique identifier to change the initials of the name on the avatar.
leadingfalse-@Composable (() -> Unit)? = nullA leading
actionfalse-@Composable (() -> Unit)? = nullActions displayed at appbar end using IconButtons.
BIND © Biofarma Innovate Next-level Design .