Momen Docs
Go to Momen
  • Get Started
    • Introduction
    • Quick Start
    • Software Development Process
    • Editor Overview
  • Changelog
    • Latest Product Update
  • Build UI
    • Pages
    • Components
    • Canvas
    • Layout
    • Component - Display
    • Component - Input
    • Component - View
    • Component - List
    • Component - Tab View
    • Component - Select View
    • Component - Conditional View
    • Component - Others
    • Component - Map
    • Custom Component
  • Data
    • Overview
    • Data Model and Database
    • API
    • Variable
    • Parameter
    • Formula and Conditions
  • Actions
    • Overview
    • Request
    • Navigation
    • Actionflow
      • Custom Code
      • Database Trigger
    • AI
      • AI Data Model
      • AI Point
      • Vector Data Storage and Sorting
    • User Actions
    • Component Management
    • App and Page Management
    • Toast Notifications & Modal
    • Payment
    • SSO
    • Share
    • Location
    • File Management
    • QR Code
    • Clipboard
    • Conditional
    • Loop
  • Release and Growth
    • Publish Application
    • Upgrade Project
    • Multiple Clients
    • Permission
    • Log Service
    • SEO
    • Hosting Files
  • My Account and Community
    • My Wallet
    • Promoting Momen
    • Code Component
    • Collaboration
  • Debugging
    • How to Debug in Momen
    • Request Error Reference
  • Tutorial
    • How to Build an AI Needs Analysis Project?
    • How to Set Up Payment with Stripe Plugin?
    • How to Embed an Iframe Component into Your Momen Project?
    • How to Build Your Login Page?
    • How to Convert Momen App to Native Mobile App?
    • How to Build a CMS (MVP Version) in Hours?
    • How to Set a Countdown Timer When Sending a Verification Code
  • Template
    • AI Mental Health Assistant
    • Angry Dietitian
    • AI Help Center
    • AI Knowledge Base
    • SaaS Corporate Site
    • Blog
    • AI Feedback Tool
    • Feedback Tool, a Nod to Canny
    • Portfolio
    • Online Courses, a Nod to Udemy
    • Mobile Auto Repair AI Scheduler
Powered by GitBook
On this page
  • 1. Show Toast
  • Introduction
  • Scenarios
  • Action configuration guide
  • Display Effect
  • 2. Show modal
  • Introduction
  • Types of Modal
  • Action configuration guide
  • Note
  1. Actions

Toast Notifications & Modal

After clicking on the component configured for this action, a toast message will be displayed on the page to provide users with information or feedback.

PreviousApp and Page ManagementNextPayment

Last updated 1 day ago

1. Show Toast

Introduction

In this tutorial, you will learn how to use Momen's [Show Toast] action to create dynamic and informative prompts in your web apps.

Scenarios

After triggering this action, the alert content will be displayed on the page.

  • When the submit form action is successfully executed, the prompt "Submit Successfully" is displayed.

  • When the login/registration action fails, the prompt "Login/Registration Failed" is displayed.

Action configuration guide

The Show Toast action is commonly used to signal the successful execution of a mutation. You can find the "Show Toast" action under the Action on Click - Toast&Modal - Show Toast.

Display Effect

At the interface's top, a text prompt displays the content of the toast, featuring a default style of black text on a white background. The style cannot be customized.

2. Show modal

Introduction

In this tutorial, you will discover the versatile functionality of modals in Momen, offering both default and custom modes for seamless interaction.

Types of Modal

There are two modes available for displaying modals: default and custom.

  1. Default You can configure the title, content, cancel text, confirm text, and the interaction action after confirming.

  2. Custom After entering the editing mode, you can drag and drop other components into the blank container to customize the editing.

    Click the modal view in the "Preview" area below, and you can edit the width, height, position, and other properties of the modal window.

    In Interaction, you can turn on the "Close on click overlay" button. After checking this option, you can hide the dialog by clicking anywhere in the modal window.

    Newly added components in the modal view can add the Hide Modal action.

Action configuration guide

Default Mode

Action on Click > Toast&Modal > Show Modal > Default > Modify Cancel/Confirm Text

Custom Mode

Action on Click > Toast&Modal > Show Modal > Custom > Enter Edit Mode

Step 1. Add a Show Modal and change the mode to Custom.

Step 2. Resize the Modal Window

Click to enter the editing modal, and adjust the size and position of the window in the "Preview" interface below.

Step 3. Build the Modal Content

Build the components of the modal in the Focus View (upper area).

Step 4. Close Modal View

  • Enable the "Click on Close Overlay" in the right component bar of the "modal-view."

    • Effect: The modal window will be closed even when you click the outer area of the modal.

  • In the "modal View" screen, add a component (generally a button) to the modal view and add the "Hide Modal" action to that component.

    • Effect: When the component is clicked, the modal will be closed.

Note

When triggering the modal action within a [List] component, direct access to the component data is restricted. To overcome this, employ the [Set Page Variable] action, transferring the component data to a page variable. This process allows subsequent utilization of specific list item data within the modal.

Sets the path to show toast action.
Display effect showcase of the Show Toast action.
Sets the path to show the modal in default mode.
Sample scenario of using show modal action in default mode.
Sets the mode of Show modal action to custom.
Sets the mode of Show modal action to custom.
Build the modal content.
Sample scenario of using show modal action in custom mode.