Viet Co Tuong · UI showcase
← Demo hub

Overlays

Dropdown, context menu, dialog, shortcut guide and message box. These share the OverlayDismissController (outside-pointer + Escape close, single-open coordination) and OverlayPositionController (position:fixed anti-clipping).

vct-dropdown

Click outside to dismiss, press Escape to close and refocus the trigger, type to filter. Opening one dropdown closes any other open overlay.

vct-dropdown — anti-clipping

The trigger lives inside a small box with overflow:hidden. The panel uses position:fixed so it escapes the clipping ancestor instead of being cut off.

overflow:hidden container

vct-context-menu

Trigger slot (or the default label) opens a fixed-position panel. A slotted vct-button is not double-framed. Dismisses on outside click or Escape.

Actions ▾

overflow:hidden container

⋮

vct-context-menu — host

hide-trigger + openFrom / openAt: one document host, local More button, right-click at the pointer. Items may include { kind: 'separator' }. Reuse this instead of restyling Bits menus.

More actions
Right-click this card

vct-dialog

Native <dialog> showModal() shell: sticky header (title), scrollable body, sticky footer (hides when empty). Optional overlay slot covers the full shell. Backdrop, focus trap, Escape-to-close; vct:close on dismissal.

Open dialog

Update the display name used across the app.

CancelSave

vct-message-box

Confirmation dialog built on vct-dialog. Emits vct:confirm or vct:cancel; dismissing via backdrop/Escape counts as cancel.

Delete game…

vct-tooltip

Hover or focus the trigger; opens after 250ms by default. Supports plain text= or rich slot=content. Uses fixed positioning so it escapes overflow:hidden ancestors.

Plain Rich
CompactPack same-depth boards tightly (current)

overflow:hidden

Clipped parent

vct-toaster

Mount once in the shell. Call toast() from anywhere — loading morphs in place to success/error; actions and description make results actionable. App update ready is the three-line deploy toast (`markup`) on non-quiet pages.

Loading → successError + actionpromise()App update ready

App update pip

Quiet routes (CBL, study, computer, live, zen) keep this pip instead of the toaster. One line: Version {new displayVersion} is ready. — only the version number is bold. Click reloads on product pages.

vct-shortcut-guide

App-wide keyboard catalog. Mount once in the shell. A desktop keyboard button, the status bar, and Shift+? open it on the current page and stage. The keyboard highlights those keys; hover links a row and its keys.

Open shortcut guide

Click the status bar, or press Shift+?.

Event log

Live output from the overlays above.

(interact with the overlays to see events)

Chia sẻ

Sao chép liên kết, chia sẻ hoặc hiện mã QR.