Navigation Bar


What is it?

A class that defines a navigation bar in the top of the screen and it’s composed by the following attributes:

AttributeTypeRequiredDefinition
titleStringTitle for the action/navigation’s bar.
show back buttonBoolEnables the return bottom on the action/navigation’s bar. Default is true.
style idStringAllows local customization for the action/navigation’s bar.
navigation bar itemsNavigation Bar ItemDefines an item’s list for the action/navigation’s bar.
back button accessibilityAccessibilityAccessibility’s informations of the backButton.

What is a NavigationBarItem?

A class that defines an item for Navigation's bar and and it has the following attributes:

AttributeTypeRequiredDefinition
textStringTitle for the bar’s item.
imageImageImage for the bar’s item.
onPressList<Action>List of actions that can be done when you click on the navigations bar item.
accessibilityAccessibilityAccessibiliy’s options for the navigation item.
idStringComponent’s identifier.

How to use it?

 Screen(
        navigationBar = NavigationBar(
            title = "Beagle Screen",
            navigationBarItems = listOf(
                NavigationBarItem(
                    text = "",
                    image = Local.justMobile("informationImage"),
                    onPress = listOf(Alert(
                        title = "Screen",
                        message = "Some message",
                        labelOk = "OK"
                    ))
                )
            )
        ),
        child = Container(
            children = listOf(
                Text("Some text")
            )
        )
    )

Last modified January 31, 2022: feature: beagle orange (#837) (a117de55)