Alert

Alerts are designed to display a list of options on a temporary surface.

TypeResource
DesignFigma
MobileMobile Storybook
CodeGitlab

Alert Preview

Usage

To implement Alert, you can use this tag Alert in the Kotlin file.

import id.co.biofarma.binduiandroid.components.alert.Alert
    Alert(
        variant="info",
        type="solid",
        title="Title for Alert",
        value="Interactive monetize corporate alignment",
        radius="none",
        showClose="false",
        onDismissRequest={}
    )

Examples

Variant

Set the variant prop to info, success, warning or danger for different color.

Alert Type

Type

Set the type prop to solid, subtle, outline, outline-light, left-accent or top-accent for different type.

Alert Type

Alert Composition

Alert could hide the title. You could pass the title props to null.

Alert with no title

Also, you could show the close action to dismiss the component. Here’s an example of an alert with wrapping content text and close component with simple close functionality.

Alert with Close


Props

PropsRequiredDefaultTypedescription
idfalse-stringA unique identifier for the component.
namefalse-stringName for alert component.
titlefalse-stringTitle text on alert.
variantfalseinfoinfo success warning dangerThe visual color variant of the alert.
typefalsesolidsolid subtle outline outline-light left-accent top-accentThe visual style of the alert.
radiusfalsenonenone xs sm md lg fullCorner radius of the alert.
valuefalse-stringDescription text of the alert.
showClosefalsefalsetrue falseShowing close action to dismiss the alert
iconfalsefalseComposeableA composable function that describes the icon in the component
onDismissRequestfalse-functionCallback function to run when close icon is clicked
stylefalse-modifierTo decorate or add behavior to Compose UI elements
BIND © Biofarma Innovate Next-level Design .