← Back

Modal

AbsoluteLayer.dialog_overlay [intermediate]

Modal dialog with title and content

Modal Demo

Modal dialog with title and content

For the full interactive experience:

$ mix raxol.playground

Code
overlays =
  if model.show do
    width = effective_width(model, @modal_width)

    [
      AbsoluteLayer.dialog_overlay(
        width,
        @modal_height,
        modal_box(model, width)
      )
    ]
  else
    []
  end

AbsoluteLayer.absolute_layer(background_view(model), overlays)
demo j/k prev/next / focus demo esc back 5/42 demos