Skip to content

CSS & Styling

Learn how @erag/vue-toastification scopes styles and how to customize component layouts.

Scoped CSS Prefixes

To prevent style leaks and collisions with popular CSS frameworks (such as Tailwind CSS, Bootstrap, or custom styling rules), all package selectors are scoped using the erag- prefix.

Key CSS selectors

You can target the following class selectors in your global stylesheets to apply custom design themes:

SelectorDescription
.erag-toast-containerMain wrapper housing the active lists of toasts.
.erag-toastOuter box of a single toast alert.
.erag-toast-successSuccess variant state styling.
.erag-toast-errorError variant state styling.
.erag-toast-warningWarning variant state styling.
.erag-toast-infoInfo variant state styling.
.erag-modal-backdropFullscreen background overlay of the confirmation modal.
.erag-btn-confirmAccent confirmation button.
.erag-btn-cancelCancel link button.

Customizing styles

To customize modal overlays, declare overrides under the specific class targets:

css
/* Customizing modal buttons to fit your design system */
.erag-btn-confirm {
  font-family: 'Outfit', sans-serif;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2);
}

.erag-btn-cancel {
  font-weight: 500;
  text-decoration: underline;
}

MIT License. Copyright Er Amit Gupta