Skip to content

1681-engine / react / listPlacement

Function: listPlacement() ​

ts
function listPlacement(
   anchor, 
   list, 
   viewport, 
   gap?, 
   margin?
): ListPlacement;

Defined in: src/react/placement.ts:71

A drop-down list under its button (anchor), over it when the room below is short and there is more above; as tall as it is or as the room on that side allows. list.width is already the measured listWidth.

Parameters ​

ParameterTypeDefault value
anchorRectundefined
listSizeundefined
viewportSizeundefined
gapnumber2
marginnumber4

Returns ​

ListPlacement

Released under the MIT License.