Ocean Alert Dialog
Centred confirmation led by a ringed icon, with the dismissive action styled quieter than the one you actually want pressed.
- lines of CSS
- 84lines of CSS
- dependencies
- 0dependencies
- browser, for years
- Everybrowser, for years
- stops under reduced motion
- Guardedstops under reduced motion
You will be signed out in two minutes unless you continue.
Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.
.fx-v7-modal-alert-ocean-10490 {
width: 250px;
padding: 1.3rem 1.1rem 1.1rem;
text-align: center;
border-radius: 0.75rem;
background: #111827;
border: 1px solid #1f2937;
box-shadow: 0 24px 50px rgba(0,0,0,0.6);
animation: fx-v7-modal-alert-ocean-10490-pop 3.4s cubic-bezier(0.34, 1.4, 0.64, 1) infinite;
}
.fx-v7-modal-alert-ocean-10490 i {
position: relative;
display: block;
width: 46px;
height: 46px;
margin: 0 auto 0.8rem;
border-radius: 50%;
background: rgba(6,182,212, 0.14);
border: 1px solid rgba(6,182,212, 0.4);
}
.fx-v7-modal-alert-ocean-10490 i::after {
content: '!';
position: absolute;
inset: 0;
display: grid;
place-items: center;
font-size: 1.25rem;
font-weight: 800;
color: #06b6d4;
}
.fx-v7-modal-alert-ocean-10490 b {
display: block;
font-size: 0.92rem;
color: #f1f5f9;
}
.fx-v7-modal-alert-ocean-10490 p {
margin: 0.4rem 0 0;
font-size: 0.76rem;
line-height: 1.55;
color: #94a3b8;
}
.fx-v7-modal-alert-ocean-10490 footer {
display: flex;
gap: 0.45rem;
margin-top: 1rem;
}
.fx-v7-modal-alert-ocean-10490 footer button {
flex: 1;
padding: 0.45rem;
border-radius: 0.4rem;
font-size: 0.78rem;
font-weight: 600;
cursor: pointer;
}
.fx-v7-modal-alert-ocean-10490 .ghost {
border: 1px solid #334155;
background: transparent;
color: #94a3b8;
}
.fx-v7-modal-alert-ocean-10490 .go {
border: none;
color: #0b1120;
background: linear-gradient(90deg, #3b82f6, #6366f1);
}
@keyframes fx-v7-modal-alert-ocean-10490-pop {
0%, 5% { opacity: 0; transform: scale(0.9) translateY(10px); }
22%, 84% { opacity: 1; transform: scale(1) translateY(0); }
100% { opacity: 0; transform: scale(0.97) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
.fx-v7-modal-alert-ocean-10490,
.fx-v7-modal-alert-ocean-10490::before,
.fx-v7-modal-alert-ocean-10490::after,
.fx-v7-modal-alert-ocean-10490 *,
.fx-v7-modal-alert-ocean-10490 *::before,
.fx-v7-modal-alert-ocean-10490 *::after {
animation-duration: 1ms !important;
animation-iteration-count: 1 !important;
animation-delay: 0ms !important;
transition-duration: 1ms !important;
transition-delay: 0ms !important;
}
}<div class="fx-v7-modal-alert-ocean-10490">
<i></i>
<b>Session expiring</b>
<p>You will be signed out in two minutes unless you continue.</p>
<footer>
<button class="ghost">Sign out</button>
<button class="go">Stay</button>
</footer>
</div>What do I do with this?
- Put
ocean-alert-dialog-10491.cssanywhere your page already loads CSS from — in Next.js that isapp/globals.css, or any stylesheet with a<link>in your HTML. - Then put the class on the element you want it on:
<button class="fx-v7-modal-alert-ocean-10490">. The CSS does nothing until a class name in it matches something on the page.
- Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add ocean-alert-dialog-10491What's included
- The markup and the stylesheet, in whichever framework you pick
- No runtime dependencies
Works with
- React
- Vue
- Svelte
- Tailwind
- styled-components
- Plain CSS
npx hoverlab add ocean-alert-dialog-10491
Or over MCP, from your editor's agent — no account needed.
License
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Motion safety
Static estimate, read from the CSS
- Reduced motion
- Guarded
Ships a
prefers-reduced-motionblock, so the loop settles into its end state for visitors who ask for less motion. - What it animates
- Compositor only
Only
transform,opacityorfilter: the GPU can run it without re-laying-out or repainting the page. - Flashing (WCAG 2.3.1)
- Under 3 flashes/s
Its brightest loop is about 0.3 a second. Estimated from duration, iterations and keyframes, not from rendered frames.
- Layout shift (CLS)
- No shift expected
Nothing it animates moves or resizes the box in flow. A category from the CSS, not a measurement for this effect.
Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed
30 more effects in Modals & Overlays
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse Modals & OverlaysShipping one commercially
Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
- A commercial licence for everything in the catalog
- Unlimited bundle exports, in Vue, Svelte and Tailwind
- One payment — no subscription, nothing to renew
7 variations of Ocean Alert Dialog
Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.