Fade and slide content in as it scrolls into view. Supports directions, effects, stagger and repeat.
Revealed once, the first time it enters the viewport.
<div class="sui-card sui-reveal" style="padding:24px;max-width:360px;"> <h4 style="margin-bottom:8px;">Fades up into view</h4> <p style="color:var(--sui-text-muted);font-size:14px;">Revealed once, the first time it enters the viewport.</p> </div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:16px;width:100%;"> <div class="sui-card sui-reveal" style="padding:20px;text-align:center;">Up</div> <div class="sui-card sui-reveal sui-reveal-down" style="padding:20px;text-align:center;">Down</div> <div class="sui-card sui-reveal sui-reveal-start" style="padding:20px;text-align:center;">Start</div> <div class="sui-card sui-reveal sui-reveal-end" style="padding:20px;text-align:center;">End</div> </div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:16px;width:100%;"> <div class="sui-card sui-reveal sui-reveal-fade" style="padding:20px;text-align:center;">Fade</div> <div class="sui-card sui-reveal sui-reveal-scale" style="padding:20px;text-align:center;">Scale</div> <div class="sui-card sui-reveal sui-reveal-zoom-out" style="padding:20px;text-align:center;">Zoom Out</div> <div class="sui-card sui-reveal sui-reveal-blur" style="padding:20px;text-align:center;">Blur</div> </div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:16px;width:100%;"> <div class="sui-card sui-reveal sui-reveal-fast" style="padding:20px;text-align:center;">Fast</div> <div class="sui-card sui-reveal" style="padding:20px;text-align:center;">Default</div> <div class="sui-card sui-reveal sui-reveal-slow" style="padding:20px;text-align:center;">Slow</div> </div>
0ms
120ms
240ms
<div data-reveal-stagger="120" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px;width:100%;">
<div class="sui-card sui-reveal" style="padding:20px;">
<h4 style="margin-bottom:6px;">Design</h4>
<p style="color:var(--sui-text-muted);font-size:13px;">0ms</p>
</div>
<div class="sui-card sui-reveal" style="padding:20px;">
<h4 style="margin-bottom:6px;">Build</h4>
<p style="color:var(--sui-text-muted);font-size:13px;">120ms</p>
</div>
<div class="sui-card sui-reveal" style="padding:20px;">
<h4 style="margin-bottom:6px;">Ship</h4>
<p style="color:var(--sui-text-muted);font-size:13px;">240ms</p>
</div>
</div>The wrapper reveals; the card keeps its hover lift. Scroll away and back to replay.
<div class="sui-reveal sui-reveal-start" data-reveal-repeat style="max-width:360px;">
<div class="sui-card sui-card-hover" style="padding:24px;">
<h4 style="margin-bottom:8px;">Wrapped card</h4>
<p style="color:var(--sui-text-muted);font-size:14px;">The wrapper reveals; the card keeps its hover lift. Scroll away and back to replay.</p>
</div>
</div><button class="sui-btn sui-btn-primary" onclick="addCard()">Add a card</button>
<div id="revealList" style="display:flex;flex-direction:column;gap:12px;max-width:360px;"></div>
<script>
function addCard() {
var card = document.createElement('div');
card.className = 'sui-card sui-reveal sui-reveal-scale';
card.style.padding = '16px 20px';
card.textContent = 'Added at ' + new Date().toLocaleTimeString();
document.getElementById('revealList').appendChild(card);
SoftUI.reveal(card);
}
</script>| Class / Attribute / Token / API | Description |
|---|---|
sui-reveal | Fades up on first scroll into view; content already on screen at load shows at once. It sets opacity, so put it on a wrapper around interactive components. |
sui-reveal-down sui-reveal-start sui-reveal-end | Slide direction; start and end flip in RTL. |
sui-reveal-fade sui-reveal-scale | Opacity only, or grow in from 95%. |
sui-reveal-zoom-out sui-reveal-blur | Shrink in from 108%, or sharpen from a blur. |
sui-reveal-fast sui-reveal-slow | 0.3s / 1.2s; on the element or any parent. |
data-reveal-stagger="80" | On a parent: each .sui-reveal child waits this many ms longer (default 80). |
data-reveal-repeat | Hides again when it leaves the viewport and replays on return. |
--sui-reveal-distance | Slide distance (default 24px). |
--sui-reveal-duration | Animation length (default 0.6s). |
--sui-reveal-blur | Starting blur for .sui-reveal-blur (default 8px). |
--sui-delay | Delay before this element starts (default 0ms). |
SoftUI.reveal(target, opts) | Reveal added content: no argument, a selector, an element or a list. |
opts.rootMargin / opts.threshold | Observer options, read on the first call only (defaults 0px 0px -10% 0px and 0.1). |
SoftUI.init(el) | Also picks up .sui-reveal inside el. |
prefers-reduced-motion | Content is always visible and nothing animates. The same applies without JS and in print. |
| Tab | Focusing content that has not revealed yet shows it at once. |
This is a neumorphic modal dialog. It features backdrop blur, smooth animations, and focus trap. Press Escape or click outside to close.
Your session will expire in 5 minutes. Would you like to stay signed in?
This action cannot be undone. This will permanently delete the item and remove all associated data.
This modal takes up the entire viewport. Useful for immersive content, editors, or media viewers.
Press Escape or click the close button to dismiss.
By accessing and using this service, you accept and agree to be bound by the terms and provision of this agreement. In addition, when using these particular services, you shall be subject to any posted guidelines or rules applicable to such services. Any participation in this service will constitute acceptance of this agreement.
Permission is granted to temporarily download one copy of the materials on this website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not modify or copy the materials, use the materials for any commercial purpose, attempt to reverse engineer any software, or remove any copyright notations.
The materials on this website are provided on an 'as is' basis. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property.
In no event shall this company or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials, even if we have been notified orally or in writing of the possibility of such damage.
The materials appearing on this website could include technical, typographical, or photographic errors. We do not warrant that any of the materials on its website are accurate, complete or current. We may make changes to the materials contained on its website at any time without notice.
We have not reviewed all of the sites linked to this website and are not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement. Use of any such linked web site is at the user's own risk.
We may revise these terms of service for this website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service. Any changes will be posted on this page with an updated revision date.
These terms and conditions are governed by and construed in accordance with applicable laws and you irrevocably submit to the exclusive jurisdiction of the courts in that location. If any provision of these terms shall be unlawful, void, or unenforceable, then that provision shall be deemed severable and shall not affect the validity of the remaining provisions.
Clicking outside this modal won't close it. Instead, the modal will shake to indicate it requires explicit action. Pressing Escape shakes it too — use the close button or an action to dismiss.
This modal has no backdrop blur. The background is visible but dimmed.
A subtle 3px backdrop blur. Content behind is slightly softened.
A heavy 12px backdrop blur. Background is barely recognizable.
Maximum 20px blur. Background is fully frosted.
This is a default right-side sheet. It slides in from the right edge of the screen with a blurred backdrop.
Sheets are great for navigation menus, settings panels, detail views, and forms that don't need to interrupt the main content flow.
This sheet slides down from the top. Great for announcements, notification panels, or search interfaces.
This is a small (280px) right-side sheet.
This is a large (480px) right-side sheet. Great for forms, detail views, or complex content.
Clicking outside this sheet won't close it. The sheet will shake to indicate it requires explicit action. Pressing Escape shakes it too. Use the close button to dismiss.