Components · Overlays

Overlays & Feedback

Transient surfaces — they appear over the page, then leave. Shadows lift only what genuinely floats. Modals, drawers, and toasts run through window.AcrossUI; tooltips and popovers are CSS/markup.

Drawer & Sheet

AcrossUI.across-drawer

An edge-anchored panel for detail and settings — slides from the right (or left/bottom). Same trigger pattern as modal: data-drawer-open / data-drawer-close.

HTML
<button class="across-btn" data-drawer-open="my-drawer">Open details</button>

<div class="across-drawer" id="my-drawer">
  <div class="across-drawer__backdrop"></div>
  <div class="across-drawer__panel">
    <div class="across-drawer__head">…<button class="across-drawer__close" data-drawer-close></button></div>
    <div class="across-drawer__body">…</div>
    <div class="across-drawer__foot"><button class="across-btn across-btn--primary" data-drawer-close>Done</button></div>
  </div>
</div>

Toast

AcrossUI.across-toast

Brief confirmation that something happened. Fired imperatively; auto-dismisses; stacks bottom-right. Four semantic kinds.

JS
AcrossUI.across-toast({ kind: "success", title: "Pinned", desc: "USD → EUR added." });

AcrossUI.across-toast({
  kind: "info", title: "Removed",
  action: { label: "Undo", onClick: function () { /* … */ } }
});

Tooltip & Popover

.across-tip · .across-pop

Tooltip is a tiny label on hover/focus (CSS only). Popover is a click-toggled panel of richer content — auto-wired by primitives.js, closes on outside-click and Esc.

Refresh rates Mid-market, updated live
HTML
<span class="across-tip across-tip--top">
  <button class="across-btn across-btn--icon"><i class="ph-light ph-arrow-clockwise"></i></button>
  <span class="across-tip__bubble">Refresh rates</span>
</span>

<span class="across-pop">
  <button class="across-btn across-pop__trigger">Options</button>
  <div class="across-pop__panel" hidden>…</div>
</span>
USD → EUR

Pair details

Mid-market rate, sources, and alert settings.

Rate
0.9234
24h
+0.23%
Updated every 8 seconds from ECB & OANDA.