Popover/Modal
A popover is a container that displays additional information or options related to a specific element on a page. It can provide context-sensitive help, display related content, or provide a short list of options for users to interact quickly with.
Type | Resource |
---|---|
Design | Figma |
Mobile | Mobile Storybook |
Code | Gitlab |
Usage
import id.co.biofarma.binduiandroid.components.popover.Popover
Popover(
id = "popover-bio",
title = "Lorem Ipsum",
description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
variant = "image",
borderRadius = ComponentRadius.NONE.value,
imageUrl = "https://images.pexels.com/photos/2325447/pexels-photo-2325447.jpeg",
showInfoIcon = true,
showCloseIcon = true,
onClose = { showPopover = false },
child = null
)
Examples
Variant
Set the variant
prop to image
or custom
.
borderRadius
Set the showCloseIcon
prop to none
xs
sm
md
lg
or full
for corner radius variant
showCloseIcon
Set the borderRadius
prop to true
, or false
for close icon on top right
Props
Props | Required | Default | Type | description |
---|---|---|---|---|
id | false | - | string | A unique identifier for the popover. |
title | false | - | string | Title of the popover. |
description | false | - | string | Long description for the popover. |
variant | false | image | image , custom | Variant of the popover. |
borderRadius | false | md | none xs sm md lg full | Corner radius size of popover card . |
imageUrl | false | - | string | Url of image in the popover |
showCloseIcon | false | false | boolean | Show close button on the top right of popover. |
showInfoIcon | false | false | boolean | Show info icon |
onClose | false | - | () -> Unit | Action when user close the popover |
onClickItem | false | - | () -> Unit | Action when click the popover |
child | false | - | @Composable | Child component of the popover |
style | false | - | Modifier | Modifier for additional styling and layout modifications. |