DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Neon Warning Modal - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Neon Warning Modal
aartigoyal
Jan 29, 2026
5
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<!-- Trigger --> <button class="btn danger" onclick="openModal()">Open Modal</button> <!-- Modal --> <div class="backdrop" id="modal"> <div class="modal"> <h2>End all sessions now?</h2> <div class="icon">!</div> <p> Prominent enadine intradisseo affected<br> akeant only affected. </p> <div class="actions"> <button class="btn secondary" onclick="closeModal()">Cancel</button> <button class="btn danger" onclick="confirmAction()">End Sessions</button> </div> </div> </div>
1
:root{ --blue:#3b82f6; --red:#ef4444; } *{box-sizing:border-box} body{ margin:0; height:100vh; display:flex; justify-content:center; align-items:center; background:radial-gradient(circle at top,#0b2a4a,#040814); font-family:system-ui, -apple-system, BlinkMacSystemFont, sans-serif; } /* backdrop */ .backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; justify-content:center; align-items:center; opacity:0; pointer-events:none; transition:.3s; } /* active */ .backdrop.active{ opacity:1; pointer-events:auto; } /* modal */ .modal{ width:420px; padding:28px; border-radius:20px; background:linear-gradient(180deg,#050c1f,#020615); color:#fff; text-align:center; position:relative; box-shadow: 0 0 40px rgba(59,130,246,.35), inset 0 0 0 1px rgba(255,255,255,.08); } /* glowing border */ .modal::before{ content:""; position:absolute; inset:-2px; border-radius:22px; background:linear-gradient( 120deg, #60a5fa, #ec4899, #60a5fa ); filter:blur(18px); opacity:.6; z-index:-1; } /* title */ .modal h2{ margin:0 0 18px; font-size:22px; font-weight:600; } /* warning icon */ .icon{ width:64px; height:64px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; border:2px solid #fb7185; color:#fb7185; box-shadow:0 0 20px rgba(251,113,133,.6); font-size:34px; } /* text */ .modal p{ font-size:14px; opacity:.7; margin-bottom:26px; } /* actions */ .actions{ display:flex; gap:14px; justify-content:center; } .btn{ padding:12px 22px; border-radius:999px; border:none; cursor:pointer; font-size:14px; font-weight:500; color:#fff; } .btn.secondary{ background:#0b1b34; box-shadow:inset 0 0 0 1px rgba(255,255,255,.15); } .btn.danger{ background:linear-gradient(120deg,#fb7185,#ef4444); box-shadow:0 0 20px rgba(239,68,68,.5); }
1
const modal = document.getElementById("modal"); function openModal(){ modal.classList.add("active"); } function closeModal(){ modal.classList.remove("active"); } function confirmAction(){ alert("All sessions ended"); closeModal(); }
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!