DialogΒΆ

/libs/granite/ui/components/coral/foundation/dialog

The dialog component. It implements foundation-toggleable vocabulary.

It has the following content structure:

granite:Dialog
  1. granite:commonAttrs
  2. granite:renderCondition
  3. granite:container
jcr:titlestring
mandatory
i18n

The title of the dialog.

closableboolean
  1. true

true to render the build-in close button (usually at the top right of the modal).

variantstring
  1. default
  1. default
  2. error
  3. notice
  4. success
  5. help
  6. info

The variant.

footer

The footer area of the dialog.

Each footer item can be any component. It supports a standard parentConfig node with the following properties:

granite:DialogFooterItemParentconfig
closebooleanel

true to indicate that this item is used to close the modal.

Example:

+ mydialog
  - sling:resourceType = "granite/ui/components/coral/foundation/dialog"
  - jcr:title = "My Dialog"
  + items
    + form
      - sling:resourceType = "granite/ui/components/coral/foundation/form"
      - granite:id = "myform"
  + footer
    + close
      - sling:resourceType = "granite/ui/components/coral/foundation/button"
      - text = "Cancel"
      + parentConfig
        - close = true
    + submit
      - sling:resourceType = "granite/ui/components/coral/foundation/button"
      - type = "submit"
      - text = "Save"
      - formId = "myform"