{% extends "base.html" %} {% block title %}Toasts & Alerts - Design System Wiki{% endblock %} {% block content %}
Dynamic toast stack notifications triggered from JavaScript, combined with static SVG alert boxes for validation errors or warnings.
<!-- 1. Dynamic Toast Trigger from JS --> <button onclick="showToast('Action Completed Successfully!')"> Trigger Success Toast </button> <!-- 2. Static Info Banner Alert --> <div class="rounded-2xl border border-sky-500/20 bg-sky-500/5 p-4 flex gap-3 text-xs text-sky-400"> <svg class="h-4.5 w-4.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/> </svg> <div> <span class="font-bold text-slate-100 block">Alert Title</span> <span class="text-muted-foreground block mt-0.5">Description of alert information.</span> </div> </div> <!-- 3. Static Warning Banner Alert --> <div class="rounded-2xl border border-amber-500/20 bg-amber-500/5 p-4 flex gap-3 text-xs text-amber-400"> <svg class="h-4.5 w-4.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/> </svg> <div> <span class="font-bold text-slate-100 block">Warning Title</span> <span class="text-muted-foreground block mt-0.5">Warning context content details.</span> </div> </div>