Styling
Customize the appearance of toasts by overriding CSS.
Default Styles
The library includes toastify.css with minimal styles:
.toast {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
color: #333;
padding: 0.75rem 1rem;
margin-bottom: 0.5rem;
border-radius: 0.25rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
animation: slideIn 0.3s ease-in-out;
max-width: 300px;
position: relative;
}
Customizing
Override styles by adding your own CSS:
@import '@raytolfas/toastify/toastify.css';
.toast-success {
background: #22c55e;
color: #fff;
}
Learn more in Examples.