Getting StartedIntroduction SOONInstallation SOONChange log SOONRoadmap SOON
Components
ContainerFlex SOONGrid SOONSticky SOONSeparator SOONAspect Ratio SOONVisually Hidden SOON
DialogPopover SOONTooltipDropdown Menu SOONContext Menu SOONHover Card SOON
Link SOONNavigation Menu SOONBreadcrumbs SOONPagination SOONStepper SOON
Collapsible SOONAccordion SOONTabs SOON
H1 SOONH2 SOONH3 SOONH4 SOONH5 SOONH6 SOONP SOONSpan SOONEm SOONI SOONStrong SOONB SOONQ SOONBlockquote SOONUl SOONOl SOONKbd SOONCode SOONTable of Contents SOON
Icon SOONAvatar SOONAvatar Group SOONImage SOONVideo SOON
Notification SOONNotification Panel SOONToast SOONAlert SOON
Spinner SOONProgress Bar SOON
Button SOONBurger Button SOONButton Group SOON
Article Preview SOONBadge SOONCard SOONCommand Line SOONTable SOONTag SOONTag Group SOONTag Picker SOONTestimonial SOONProduct Tile SOONSkeleton SOONStatistic SOON
Address Input SOONCheckbox SOONCalendar Input SOONCalendar Range Input SOONColor Picker SOONCurrency Input SOONCredit Card Input SOONDate Input SOONDate Picker SOONDate Range Input SOONDate Range Picker SOONFieldset SOONFile Input SOONFile Dropzone SOONFile Picker SOONLabel SOONPin Input SOONPhone Number Input SOONRadio Button SOONRadio Group SOONRange Slider SOONRating SOONSearch Input SOONSwitch SOONSegmented Control SOONSelect SOONSlider SOONText Input SOONTextarea SOONToggle SOONToggle Group SOONURL Input SOON
TBD SOON

Overlays

Components that block interaction with the rest of the application.

Modals vs Dialog

"Modal" is sometimes used to mean "dialog", but this is incorrect. An element is considered modal if it blocks interaction with the rest of the application. A Dialog, on the other hand, is just one of many types of modals.

Modal Overlay Styling

All modals have an overlay container element that is typically a partially transparent element that covers the rest of the screen behind the modal, and prevents the user from interacting with the elements behind it.

You can find the styles for the overlay in the component-styles.css file:

component-styles.css
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
/* ### Modals ### */
@layer components {
/* Modal Overlay */
.modal-overlay {
@apply fixed inset-0 z-10 flex min-h-full items-center justify-center overflow-y-auto bg-muted-950/25 p-4 text-center backdrop-blur;
&[data-entering] {
@apply duration-300 ease-out animate-in fade-in;
}
&[data-exiting] {
@apply duration-200 ease-in animate-out fade-out;
}
}
/* Modal */
.modal {
@apply w-full max-w-md overflow-hidden rounded-2xl bg-background p-6 text-left align-middle shadow-xl;
&[data-entering] {
@apply duration-300 ease-out animate-in zoom-in-95;
}
&[data-exiting] {
@apply duration-200 ease-in animate-out zoom-out-95;
}
}
}

Notice the overlay supports entry and exit animations, exposed as [data-entering] and [data-exiting] DOM attributes that you can target with CSS selectors. Modal components will automatically wait for any exit animations to complete before removing the element from the DOM.