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>

Install prompt

.across-install-nudge

How an app offers to be added to the Home Screen, Dock, or desktop. The nudge is not modal and never takes focus; it shows the app's real icon. Its button installs in one tap where the browser can, or opens the guide: a kit modal (bottom-anchored on phones) whose steps draw the browser's real buttons inline with .across-install-glyph. Rendered by the runtime's pwa/install-experience.js; apps don't hand-write this markup.

Add Across to Your Home Screen

It opens in one tap, full screen.

  1. Tap at the left end of the address bar.
  2. Tap Share .

Is there a Share button in Safari’s toolbar? Tap it, then go to step 3.

JS
import { initInstallExperience } from '@across/runtime/pwa/install-experience.js';
initInstallExperience({ appName: 'Orbit', storagePrefix: 'orbit',
  menu: { itemSelector: '[data-menu-action="install"]', labelSelector: '[data-install-label]' } });
USD → EUR

Pair details

Mid-market rate, sources, and alert settings.

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