Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Loader
    • Modal
    • Month picker
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Modal

The Modal component provides a versatile and user-friendly way to display content in a focused, interruptive view. Ideal for prompts, forms, or any content that requires user interaction, our Modal ensures that the content within is front and center.

Usage

  import { RModal } from '@rebilly/revel';

  <r-modal v-show="true" title="Modal">
    <template #content>
      <p>Modal content</p>
    </template>
  </r-modal>

Examples

modal-simple.vue

Multi-content

modal-multiple-content.vue

Multi-step

modal-multi-step.vue

API

Props

NameTypeDefaultDescription
showbooleantrue

Use this prop to conditionally show the modal from the outside

titleNullable, stringnull

Adds a title to the modal

cancelLabelstring'Cancel'

Adds a label to the cancel button

sizeNullable, ModalSizenull

Adds a size to the modal

scrollbooleanfalse

Adds a scroll to the modal

scrollContentbooleanfalse

Adds a scroll to the content of the modal. Only works when using it with the `content` slot

durationnumber0.15

Adds a duration to the modal transition

Slots

NameDescription
header-actions

Header actions container

contents

Content area for border-separated pieces of content

content

Content area for a single piece of content

left-actions

Left side of the footer actions container

right-actions

Right side of footer actions container

actions

Default footer actions container

Events

NameDescription
close
submit
leave
enter
Edit this page
Last Updated: 7/19/24, 2:04 PM
Contributors: Alberto Gualis, John Hannagan, Weetbix, Cesar Level
Prev
Loader
Next
Month picker