Available since v0.1.0
fs-trigger="hover"
StableFires when the mouse enters the element. Implemented as an alias for mouseenter (non-bubbling, once per enter — not the noisier mouseover).
Syntax
<div class="product-card"
fs-assert="catalog/show-quick-view"
fs-trigger="hover"
fs-assert-visible=".quick-view-overlay">
When to use it
- Hover-activated tooltips or quick-view overlays
- Preview-on-hover UI (image thumbnails expanding, video auto-play)
- Menu drawers that expand on pointer entry
Example
<button class="help-button"
fs-assert="help/show-tooltip"
fs-trigger="hover"
fs-assert-visible=".tooltip">
?
</button>
Pairs well with
fs-assert-visible— tooltip or preview appearsfs-assert-added— lazily-mounted preview is insertedfs-assert-timeout— cap how fast the hover reaction needs to be
Gotchas
- Touch devices. There's no hover on touch — the assertion will never fire on phones and tablets. Mirror it with a
click- orfocus-triggered variant if you need mobile coverage. - Rapid enter/leave. Flicking the cursor in and out can produce many trigger fires in quick succession. Each starts a fresh assertion.
See also
click— touch-safe alternativefocus— keyboard-accessible alternative- Triggers index