Skip to main content Red Hat Design System logo Contribute on Github v1.4.5

Dialog

Overview Style Guidelines Code Demos Accessibility

Installation

Usage

<rh-dialog trigger="standard-trigger">
  <h2 slot="header">Leave page</h2>
  <p>If you leave the page, any unsaved information will be lost.</p>
  <rh-button slot="footer">Leave</rh-button>
  <rh-button slot="footer" variant="tertiary">Cancel</rh-button>
</rh-dialog>
<rh-button id="standard-trigger">Open modal dialog</rh-button>

rh-dialog

Slots 3
Slot Name Description

The default slot can contain any type of content. When the header is not present this unnamed slot appear at the top of the dialog window (to the left of the close button). Otherwise it will appear beneath the header.

header

The header is an optional slot that appears at the top of the dialog window. It should be a header tag (h2-h6).

footer

Optional footer content. Good place to put action buttons.

Attributes 5 Methods 5 Events 3 CSS Shadow Parts 7 CSS Custom Properties 2 Design Tokens 0
© 2021-2024 Red Hat, Inc. Deploys by Netlify