Animated Dialog
Components
DialogOpen a new window that can be either modal or non-modal and optionally rendered in a React portal. This component is based on the WAI-ARIA Dialog Pattern.
ButtonTrigger an action or event, such as submitting a Form, opening a Dialog, canceling an action, or performing a delete operation in React. This component is based on the WAI-ARIA Button Pattern.
Styling
Use the data-enter
and data-leave
attributes to animate the dialog and the backdrop elements:
.backdrop {
opacity: 0;
transition: opacity 200ms;
}
.backdrop[data-enter] {
opacity: 1;
}
.dialog {
transform: scale(0.95);
transition: transform 200ms;
}
.dialog[data-enter] {
transform: scale(1);
}
You can learn more about these data-*
attributes on the Styling guide.