overlays
БесплатноБез исполняемых скриптовНе проверенBuilds dialogs, menus, popovers, tooltips, sheets and toasts on the browser's top layer, with declared dismissal and a page that never moves.
от raphaelsalaja★ 74 звезды на GitHubОб этом скилле
Overlays
This skill holds how layers above the page open, sit and close. It covers dialogs, menus, popovers, tooltips, sheets, toasts, banners, scroll lock and dismissal.
The platform first, then these values
Build blocking overlays on <dialog> and the rest on popover, unless the project's component library already provides them. Where no token exists, the offsets, counts and durations here are exact. An overlay clipped by an ancestor or a page that shifts as one opens is a finding in any style.
Shadows, rings, scroll fades and focus rings inside an overlay belong to defaults, and so do live regions and undo. A form inside a dialog belongs to forms, and so does the guard on leaving a changed form. How an overlay enters, exits and drags belongs to motion, and backdrop contrast belongs to color. Walking overlays from the keyboard belongs to keyboard, and a dialog taller than a short screen belongs to viewports.
Overlays live in the top layer
A blocking overlay is a <dialog> opened with showModal(), or by command="show-modal" and commandfor. Menus, tooltips and toasts use the popover attribute. On the top layer, a modal makes the page inert, traps focus, closes on Escape or the back gesture and returns focus on close. The open attribute and show() give a non-modal dialog that leaves the page live, so a blocking dialog never uses either.
A portal with z-index: 9999, role="dialog", aria-modal or a hand-written trap is overlays-top-layer, unless the project's component library provides it. See recipes.md.
Dialogs hold focus
Focus left on the page behind an open dialog, or not returned to its trigger on close, is overlays-trap-and-return-focus.
Focus starts on the element marked autofocus, such as the first field of a form. A dialog whose text runs past its first screen focuses its heading instead, set to tabindex="-1", so the start stays in view. A long dialog that opens scrolled down to its first button is overlays-initial-focus.
Dialogs say what they are and how to leave
A dialog takes its name from its visible heading through aria-labelledby. A dialog announced only as "dialog" is overlays-name-the-dialog.
Every dialog and sheet has a visible Close or Cancel button in its tab order. Escape and outside clicks are invisible, and a touch screen has no Escape key. A dialog that closes only by Escape or a click on the backdrop is overlays-visible-close. The button that stands in for a sheet's drag belongs to motion.
One dialog at a time
Never open a dialog on top of a dialog. Use a menu, a popover or a new page. That is overlays-no-stacked-dialogs.
No dialog opens on page load. A startup problem, such as being offline, shows cached content with a quiet inline marker. A modal greeting every visit is overlays-no-dialog-on-load.
Dialog buttons keep one order
A dialog footer puts Cancel on the left as a secondary button and the primary action outermost on the right. Save left of Cancel is overlays-button-order. Keeping one primary button per footer belongs to color.
Destructive buttons are never the default
A destructive button is never the default or autofocused, so focus starts on Cancel and Enter never deletes. The rarest and worst actions, such as deleting a workspace, require typing the object's name. A Delete button with autofocus is overlays-destructive-not-default.
Locking scroll never moves the page
A modal locks the page in CSS, with overscroll-behavior: contain on dialog:modal and overflow: hidden; overscroll-behavior: contain on dialog::backdrop. Safari ignores overscroll-behavior on a box that cannot scroll, so html:has(dialog:modal) also takes overflow: hidden. Never set position: fixed on body, because the page jumps to the top and back.
The lock moves nothing behind the dialog, so hiding the root's scrollbar relies on the stable gutter that defaults owns. A page that shifts or jumps as a dialog opens is overlays-stable-gutter. See recipes.md.
Outside clicks never lose work
A click outside closes an overlay only when nothing would be lost. A dialog with unsaved input, or a destructive confirm, closes only from its own buttons and Escape. A form dialog that drops typed text on an outside click is overlays-safe-outside-press.
Each dialog declares its dismissal. closedby="any" allows an outside click, and a dialog holding changes takes closedby="closerequest" with a guard in its cancel handler. Its Cancel button takes command="request-close", or calls requestClose(), so the same guard runs. Safari lacks closedby, so the guard stays in cancel. Chrome lets a page cancel cancel only once per user activation, so a second Escape closes a dirty dialog anyway. So the first Escape shows the confirm inside the dialog and keeps the draft, rather than relying on preventDefault() alone. One Escape closes o
Установить overlays в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл overlays?
Builds dialogs, menus, popovers, tooltips, sheets and toasts on the browser's top layer, with declared dismissal and a page that never moves.
Как установить скилл overlays?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл overlays запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic