Skip to content

Styling

A fair bit of styling can be adjusted using the configuration options. However, you may want to customize the modal even further using CSS. The components use Tailwind CSS classes, but all major elements have their own class names, so you can easily target them with your own styles.

Available Classes

You're probably the fastest if you just inspect the modal in your browser and see which classes are used. To give you a head start, here are the classes that are used: all classes are prefixed with im- to avoid conflicts with other classes.

ClassDescription
im-dialogThe Headless UI dialog component
im-close-buttonThe close button
im-backdropThe backdrop behind the modal
im-modal-containerThe screen-filling container for the modal
im-modal-positionerThe container that positions the modal vertically
im-modal-wrapperThe container that sets the maximum width of the modal
im-modal-contentThe actual modal content
im-slideover-containerThe screen-filling container for the slideover
im-slideover-positionerThe container that positions the slideover vertically
im-slideover-wrapperThe container that sets the maximum width of the slideover
im-slideover-contentThe actual slideover content