Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Elements
  • Overview
  • Usage
  • Components Customization
  • Elements
    • Apps Icons
    • Breadcrumb
    • Color Picker
    • Conditional Fields
    • Count Down
    • Filters
    • Infinite Scroll
    • List Tile
    • Loading
    • Map
    • Modal
    • Placeholder
    • Progress Bar
    • Rating Stars
    • Reviews
    • Reviews Summary
    • Sheet
    • Skeleton
    • Slider
    • Social
    • Social Share
    • Tabs
  • Form
    • Button
    • Bottom Alert
    • Contacts
    • Date Time Picker
    • File Upload
    • Menu
    • Quantity Input
    • Select
    • Tel Input
  • Product
    • Add Product
    • Advertisement
    • Comments
    • Conditional Offer
    • Gifting
    • Installment
    • Meta Data
    • Offer
    • Offer Modal
    • Orders
    • Payments
    • Product Availability
    • Product Card
    • Products List
    • Product Options
    • Product Size Guide
    • Products Slider
    • Quick Buy
    • Quick Order
    • Scopes
    • Search
  • User
    • Cart Summary
    • Localization
    • Login
    • Loyalty
    • Rating
    • User Menu
    • User Profile
    • User Settings
    • Verify
  1. Elements

Modal

The <salla-modal> web component displays a dialog box or pop-up window on top of the current page. It is positioned above all other components in the application, restricting scrolling of the main page and only allowing scrolling of the modal's content. It consists of a Button component to activate the modal, and that can be customized using the properties, events, methods and slots' parameters available.

Example#

Modal Example

Usage#

HTML
SASS

Properties#

PropertyAttributeDescriptionTypeDefault
CeneteredceneteredAligns the modal's content to be in center viewboolean'false'
Has Skeletonhas-skeletonOpens the modal on rendering the componentboolean'false'
Icon Styleicon-styleSets the modal's header icon style."error" | "success" |"normal" | "primary"'undefined'
Is Closableis-closableSets the modal to be at the closing stateboolean'true'
Is Loadingis-loadingShows the loading state in the modalboolean'false'
No Paddingno-paddingAdds no Padding to the modalboolean'false'
PositionpositionPositions the modal in a fixed part of the screen"bottom" | "middle" | "top"'middle'
Sub Titlesub-titleSets the modal subheader contextstring''
Sub Title Firstsub-title-firstWhether or not to show the subtitle before the titleboolean'false'
VisiblevisibleShows the modal on rendering the componentboolean'false'
WidthwidthAdjusts the size of the modal"full" | "lg" | "md" | "sm" | "xl" | "xs"'md'

Methods#

The pre-defined methods allow for calling functions built by Salla to carry out certain actvities, such as close which closes the modal dialog.
MethodDescriptionReturn Type
close()Closes the modal dialogPromise<HTMLElement>
loading()Loads the modal dialogPromise<HTMLElement>
setTitle(modalTitle: any)Sets the title of the modal dialogPromise<HTMLElement>
open()Opens the modal dialogPromise<HTMLElement>
stopLoading()Stops loading the modal dialogPromise<HTMLElement>
Note
To use a method, you can for instance use open the component via the method:
and close the component via the method:

Slots#

Theslots makes it customizable to modify certain labels, such as footer
SlotDescription
footerFooter of the modal

Events#

EventDescriptionType
modalVisibilityChangedThis event will be fired when the modal visibilty is changedCustomEvent<Boolean>
Modified at 2025-03-04 12:54:02
Previous
Map
Next
Placeholder