• Home
  • Docs
Elixir Logo - a violet shaded diamond

elixir

Components
  • Alert
  • Avatar
  • Badge
  • Button
  • Card
  • Grid
  • Image
  • Input
  • List
  • Modal
  • Navigation
  • Rating
  • Slider
  • Toast
  • Typography

Modal

A modal is a small window that appears over the main window to grab the user's attention. A modal displays important information on actions that the user has to perform before working with the main window.

Elixir offers a Simple Modal some text and some action buttons.

Simple Modal

A simple modal consists of a text conveying information along with action buttons.

To generate a modal use the base class modal-container and active-modal.
Add the modal text and action buttons within the modal-content container. And use the following classes - modal-text and modal-action-buttons - for the modal text and acrion buttons respectively.

Please note: For displaying the active modal and disabling the scroll in the body you can add the following code -

    
        body {
            overflow: hidden;
        }
    
Discard draft?
Discard draft? Lorem ipsum dolor sit amet consectetur adipisicing elit. A eius accusamus distinctio assumenda pariatur dicta molestiae officiis velit, possimus voluptatum repudiandae repellat hic id asperiores facere, recusandae, inventore quod. Aliquam.

Copy the code below to use a simple modal

Copy the code below to for the close button click JavaScript functionality.

  • List
  • Navigation

by Bharati