Skip to main content
Version: Next

actionsheet

README.md

ActionSheet Component

This action sheet can be used to perform a specific action related to the parent view without leaving the current context. A sheet is displayed as a view placed over parent view which covers around 50% of the screen. If the content of sheet exceed 50% of screen height then it hides content partially underlying visible window. The underlying content can be seen by pulling up the sheet. Action sheet can be dismissed in order to interact with the main content. Action sheet can be dismissed by:

  • Tapping a menu item or action within the bottom sheet
  • Tapping the scrim(parent screen)
  • Swiping the sheet down

Features:

  • Action Sheet contains button to perform a specific task.
  • Perform any action after tapping action button.
  • Add any number of action buttons
  • Dismiss the sheet by tapping on parent screen, by tapping action buttons or by swiping the sheet.

How to use Modal Component

  1. Add the necessary imports:

    import your.package.name.OCActionSheet

  2. Use the required List Item in your Composable:

        ActionSheet(
    items = items,
    actionSheetConfig = actionSheetConfig,
    onSelection = {
    },
    )

Parameters:

items: data to display action buttons, actionSheetConfig: data for configuring the action sheet