Action Sheet
import { AXActionSheetModule } from '@acorex/components/action-sheet';
Action sheet is a type of alert offering two or more options relevant to the context. It includes a title, an optional message, and a list of actions, with the title above and the actions below.
Overview
In this section, you can test different options of this component and see the output in real time
Usage
A simple example of using action sheet
placeholder
List item
The action sheet can receive and display an array of AXActionSheetItem
.
placeholder
Custom content
You can use the action sheet to display your desired content. It is enough to set the content
value equal to a component or template ref
placeholder
List item and custom content together
You can have both items
and use content
mode in an action sheet
placeholder
On close
this method call when you close action sheet
placeholder
Draggable
The action sheet is draggable and expands to full screen when pulled upward.
placeholder
Methods
open | config: AXActionSheetConfig | Specifies the function to be called to open the action sheet with the given configuration. |
AXActionSheetConfig
title | string | Sample Title | Sets the title of the action sheet. |
subtitle | string | The subtitle is placed here so that if you have an explanation about this action sheet, you can insert it | Provides a subtitle or description for the action sheet. |
showHeader | boolean | true | Determines whether the header is displayed. |
closeOnBackdrop | boolean | true | Specifies whether the action sheet should close when the backdrop is clicked. |
showCloseButton | boolean | true | Determines whether a close button is displayed. |
items | AXActionSheetItem[] | [] | Specifies the array of button items to be displayed in the action sheet. |
content | TemplateRef | - | Defines the custom template content to be displayed in the action sheet. |