Skip to content

Add optional safe triangle to <post-popovercontainer> #4169

Open
@gfellerph

Description

A safe triangle allows hovering a different active area with your mouse without triggering another hover event.

Safe triangle

Example of red colored safe triangle from shoelace. The safe triangle allows the mouse to move to level 2 menu entries directly and not triggering another level 1 hover interaction when the mouse path crosses another level 1 item. The safe triangle spans from the current mouse position to the nearest edges of the open menu.

sr1.mp4

https://shoelace.style/components/menu

Safe trapezoid

A safe trapezoid builds a bridge between two elements, e.g. a tooltip and it's trigger so the mouse can safely move between the two elements without closing the tooltip. The safe trapezoid connects the nearest outer edges of each element and does not depend on the mouse position.

Image

Proposed API

<post-popovercontainer safe-space="triangle|trapezoid">
  <slot></slot>
</post-popovercontainer>

Implementation reference

Tasks

Preview Give feedback

Metadata

Assignees

Labels

📦 componentsRelated to the @swisspost/design-system-components package

Type

No type

Projects

  • Status

    🤬 Dev in Code Review

Relationships

None yet

Development

No branches or pull requests

Issue actions