Package-level declarations

Types

Link copied to clipboard
data class BottomSheetStyles(val transitionDuration: Int = 300, val scrimColor: Color = Color.Black.copy(alpha = .5f), val maxWidth: Dp = 500.dp, val shadow: OuterShadow = OuterShadow( blur = 11.dp, color = Color.Black.copy(alpha = .25f), shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp) ), val backgroundColor: Color = Color.White, val backgroundShape: Shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp), val contentPadding: PaddingValues = PaddingValues(16.dp))
Link copied to clipboard
data class DrawerStyles(val topMargin: Dp = 0.dp, val transitionDuration: Int = 300, val scrimColor: Color = Color.Black.copy(alpha = .5f), val width: Dp = 300.dp, val shadow: OuterShadow = OuterShadow( blur = 11.dp, color = Color.Black.copy(alpha = .25f), shape = RoundedCornerShape(topEnd = 16.dp, bottomEnd = 16.dp) ), val backgroundColor: Color = Color.White, val backgroundShape: Shape = RoundedCornerShape(topEnd = 16.dp, bottomEnd = 16.dp), val contentPadding: PaddingValues = PaddingValues(16.dp))
Link copied to clipboard
data class ModalStyles(val transitionDuration: Int = 200, val scrimColor: Color = Color.Black.copy(alpha = .5f), val shadow: OuterShadow = OuterShadow( blur = 11.dp, color = Color.Black.copy(alpha = .25f), shape = RoundedCornerShape(8.dp) ), val backgroundColor: Color = Color.White, val backgroundShape: Shape = RoundedCornerShape(8.dp), val windowPadding: PaddingValues = PaddingValues(20.dp), val contentPadding: PaddingValues = PaddingValues(16.dp))
Link copied to clipboard
data class PopoverAnchors(val parent: Alignment, val popover: Alignment)

PopoverAnchors declares the two points that meet when showing a popup. For example, if parent = Alignment.BottomStart and popover = Alignment.TopStart, the popover's top left corner will meet the parents bottom left corner

Link copied to clipboard

Properties

Link copied to clipboard
const val popoverAnimDuration: Int = 150

Functions

Link copied to clipboard
fun BottomSheet(isVisible: Boolean, modifier: Modifier = Modifier, onDismissRequest: () -> Unit? = null, dismissOnExternalClick: Boolean = true, dismissOnBackPress: Boolean = true, dismissOnSwipe: Boolean = true, isFullScreen: Boolean = true, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, styles: BottomSheetStyles = remember { BottomSheetStyles() }, content: @Composable BoxScope.() -> Unit)

Creates a fully customizable BottomSheet

Link copied to clipboard

Use to allow a bottom sheet to be swiped to dismiss. This can be used in place of shouldDismissOnSwipe to provide a specific swipe handle to the user.

Link copied to clipboard
fun Drawer(isVisible: Boolean, modifier: Modifier = Modifier, onDismissRequest: () -> Unit? = null, dismissOnExternalClick: Boolean = true, dismissOnBackPress: Boolean = true, dismissOnSwipe: Boolean = true, isFullScreen: Boolean = true, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, styles: DrawerStyles = remember { DrawerStyles() }, content: @Composable BoxScope.() -> Unit)

Creates a fully customizable Drawer

Link copied to clipboard
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: @Composable () -> Unit)
actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
expect fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean = false, onDismissRequest: () -> Unit? = null, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, focusable: Boolean = false, isFullScreen: Boolean = true, content: @Composable () -> Unit)

Creates a customizable Popup with a given position

expect fun KmpPopup(alignment: Alignment = Alignment.Center, offset: IntOffset = IntOffset.Zero, dismissOnBackPress: Boolean = false, onDismissRequest: () -> Unit? = null, focusable: Boolean = false, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, isFullScreen: Boolean = true, content: @Composable () -> Unit)

Creates a customizable Popup with a given alignment

actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(popupPositionProvider: PopupPositionProvider, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, focusable: Boolean, isFullScreen: Boolean, content: () -> Unit)
actual fun KmpPopup(alignment: Alignment, offset: IntOffset, dismissOnBackPress: Boolean, onDismissRequest: () -> Unit?, focusable: Boolean, onPreviewKeyEvent: (KeyEvent) -> Boolean, onKeyEvent: (KeyEvent) -> Boolean, isFullScreen: Boolean, content: () -> Unit)
Link copied to clipboard
fun Modal(isVisible: Boolean, modifier: Modifier = Modifier, onDismissRequest: () -> Unit? = null, dismissOnExternalClick: Boolean = true, dismissOnBackPress: Boolean = true, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, isFullScreen: Boolean = true, styles: ModalStyles = remember { ModalStyles() }, content: @Composable BoxScope.() -> Unit)

Creates a fully customizable Modal

Link copied to clipboard
fun Popover(isVisible: Boolean, anchors: PopoverAnchors = PopoverAnchors.ExternalBottomAlignStart, offset: DpOffset = DpOffset(0f.dp, 0f.dp), popupPositionProvider: PopupPositionProvider? = null, onDismissRequest: () -> Unit? = null, dismissOnBackKey: Boolean = true, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, focusable: Boolean = true, content: @Composable BoxScope.() -> Unit)
fun <T> Popover(isVisible: Boolean, anchors: PopoverAnchors = PopoverAnchors.ExternalBottomAlignStart, offset: DpOffset = DpOffset(0f.dp, 0f.dp), popupPositionProvider: PopupPositionProvider? = null, onDismissRequest: () -> Unit? = null, dismissOnBackKey: Boolean = true, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, focusable: Boolean = true, transitionValueCreator: @Composable (transition: Transition<Boolean>) -> T, content: @Composable BoxScope.(T) -> Unit)