Skip to content

OverlayConfigFactory

OverlayConfigFactory<P> = (props) => OverlayConfig

Defined in: asset.ts:546

A factory that builds an OverlayConfig from caller-supplied props. Use this to make an overlay programmatic: the returned config (its path, props, and placement) can depend on values only known at runtime, for example a locator’s position captured with overlayRect.

P = unknown

P

OverlayConfig

const overlays = createOverlays({
ring: (t: Locator) => ({ path: './ring.html', over: t, margin: 6 }),
})
await overlays.ring(saveButton).for(1200)