Wallet connect
Choose, connect, confirm. No hidden signature request.
- Primary
- Continue
- Escape
- Use a different wallet
Design artifact 07 / Popup kit
The moments where a trader commits money, reveals a wallet, or asks for help. Seven dialogs and two inline surfaces, built on the same Terminal Ledger grammar: graphite, hairline rules, one signal color, and a visible way out.
07
modal patterns
02
inline surfaces
01
focus trap
Trade / Order ticket
Check the size, price, and liquidation level before you sign.
01 / The kit
Every dialog answers three questions: what is happening, what does it cost, and how do I leave? Open one to test focus, Escape, and the mobile sheet.
Choose, connect, confirm. No hidden signature request.
Size, margin, and liquidation in one final check.
The five risks that matter, then an explicit acknowledgement.
A receipt, not a dead end: amount, hash, next step.
Structured intake with a ticket ID and a reply promise.
Say what is safe, offer retry, keep REST open.
Thumb-reachable actions, destructive item last.
Not every interruption deserves a modal. Privacy choices live in a compact banner; confirmations live in a toast.
02 / Inline surfaces
Consent is a preference, not a roadblock. Toasts confirm work that is already done. Both stay out of the keyboard path.
08 / Consent banner
Privacy / Local storage
A small ledger, not a tracking net.
We store your theme, recent searches, and checklist progress in this browser. Optional analytics stays off until you allow it. We do not sell personal data.
Waiting for a choice
The production banner stores the choice in local storage and only loads analytics when a token is configured and the visitor opts in. Reopen it from “Privacy choices” in the footer.
09 / Toast
Rules
03 / Behavior
Escape always works
Esc closes, the backdrop closes, and every dialog has a visible close control.
Focus is contained
Tab and Shift+Tab cycle inside the panel. Focus returns to the trigger on close.
Mobile is a sheet
Below 640px the dialog anchors to the bottom with a grab handle and safe-area room.
One decision
Primary action is singular. Destructive actions are last and visually separated.
State matrix
No state yet
| Pattern | Trigger | Success | Failure | Recovery |
|---|---|---|---|---|
| Wallet | Connect | Address + chain | Rejected / wrong chain | Retry or switch wallet |
| Order | Confirm | Order ID + open state | Margin / rejection | Edit size, retry |
| Risk | First trade | Accepted | Not accepted | Stay on docs |
| Faucet | Claim | Amount + hash | Cooldown | Show next window |
| Support | Submit | Ticket ID | Validation / storage | Keep the form |
| Connection | Heartbeat loss | Replay from seq | Retry fails | REST fallback |
04 / Handoff
All dialogs share a portal, a focus trap, body scroll lock, Escape handling, and a mobile bottom-sheet layout. The kit lives in src/components/ui/modal.tsx and src/components/popups/.
Portal
Rendered into document.body; never clipped by a card.
Focus
Tab cycles inside. Focus returns to the trigger.
Escape
Esc and backdrop both close; the close button is visible.
Mobile
Bottom sheet below 640px with a grab handle.
Motion
180–220ms, reduced-motion safe, never bounces.
Z-index
Consent 70, modal 80, toast 90. No stacking wars.